[PATCH] D101972: For visibility of llvm::Any to external
serge via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 12 05:47:33 PDT 2021
serge-sans-paille updated this revision to Diff 344788.
serge-sans-paille added a comment.
Force extran visibilty on a limited set of symbols
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101972/new/
https://reviews.llvm.org/D101972
Files:
llvm/include/llvm/ADT/Any.h
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<StorageImpl<T>>(Value);
}
- const void *id() const override { return &TypeId<T>::Id; }
+ LLVM_EXTERNAL_VISIBILITY const void *id() const override {
+ return &TypeId<T>::Id;
+ }
T Value;
@@ -108,10 +110,10 @@
std::unique_ptr<StorageBase> Storage;
};
-template <typename T> const char Any::TypeId<T>::Id = 0;
-
+template <typename T>
+LLVM_EXTERNAL_VISIBILITY const char Any::TypeId<T>::Id = 0;
-template <typename T> bool any_isa(const Any &Value) {
+template <typename T> LLVM_EXTERNAL_VISIBILITY bool any_isa(const Any &Value) {
if (!Value.Storage)
return false;
return Value.Storage->id() == &Any::TypeId<remove_cvref_t<T>>::Id;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D101972.344788.patch
Type: text/x-patch
Size: 896 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210512/e1c47ad9/attachment.bin>
More information about the llvm-commits
mailing list