diff options
author | Zachary Turner <zturner@google.com> | 2018-07-20 17:50:53 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2018-07-20 17:50:53 +0000 |
commit | a219bae1b750df8a1eb171c2e8d3a06fef795e2c (patch) | |
tree | 77387974b65b82e7166f8f272707410956115583 | |
parent | fa07bb646cc39f4f218ab59aac4da813edc9053d (diff) | |
download | bcm5719-llvm-a219bae1b750df8a1eb171c2e8d3a06fef795e2c.tar.gz bcm5719-llvm-a219bae1b750df8a1eb171c2e8d3a06fef795e2c.zip |
Fix linker failure with Any.
This is due to a difference in MS ABI which is why I didn't see
it locally. The included fix should work on all compilers.
llvm-svn: 337588
-rw-r--r-- | llvm/include/llvm/ADT/Any.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/include/llvm/ADT/Any.h b/llvm/include/llvm/ADT/Any.h index 2be15bb1d88..c64c3998754 100644 --- a/llvm/include/llvm/ADT/Any.h +++ b/llvm/include/llvm/ADT/Any.h @@ -25,7 +25,7 @@ namespace llvm { class Any { - template <typename T> struct TypeId { static const char Id = 0; }; + template <typename T> struct TypeId { static const char Id; }; struct StorageBase { virtual ~StorageBase() = default; @@ -99,6 +99,9 @@ private: std::unique_ptr<StorageBase> Storage; }; +template <typename T> const char Any::TypeId<T>::Id = 0; + + template <typename T> bool any_isa(const Any &Value) { if (!Value.Storage) return false; |