aboutsummaryrefslogtreecommitdiff
path: root/llvm/include/llvm/ADT/Any.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/include/llvm/ADT/Any.h')
-rw-r--r--llvm/include/llvm/ADT/Any.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/include/llvm/ADT/Any.h b/llvm/include/llvm/ADT/Any.h
index 0aded628cda4..1e3abca70679 100644
--- a/llvm/include/llvm/ADT/Any.h
+++ b/llvm/include/llvm/ADT/Any.h
@@ -23,7 +23,12 @@
namespace llvm {
-class Any {
+class LLVM_EXTERNAL_VISIBILITY Any {
+
+ // The `Typeid<T>::Id` static data member below is a globally unique
+ // identifier for the type `T`. It is explicitly marked with default
+ // visibility so that when `-fvisibility=hidden` is used, the loader still
+ // merges duplicate definitions across DSO boundaries.
template <typename T> struct TypeId { static const char Id; };
struct StorageBase {