Index: llvm/include/llvm/ADT/Any.h =================================================================== --- llvm/include/llvm/ADT/Any.h +++ llvm/include/llvm/ADT/Any.h @@ -41,7 +41,9 @@ return std::make_unique>(Value); } - const void *id() const override { return &TypeId::Id; } + LLVM_EXTERNAL_VISIBILITY const void *id() const override { + return &TypeId::Id; + } T Value; @@ -108,10 +110,10 @@ std::unique_ptr Storage; }; -template const char Any::TypeId::Id = 0; - +template +LLVM_EXTERNAL_VISIBILITY const char Any::TypeId::Id = 0; -template bool any_isa(const Any &Value) { +template LLVM_EXTERNAL_VISIBILITY bool any_isa(const Any &Value) { if (!Value.Storage) return false; return Value.Storage->id() == &Any::TypeId>::Id;