From a219bae1b750df8a1eb171c2e8d3a06fef795e2c Mon Sep 17 00:00:00 2001 From: Zachary Turner Date: Fri, 20 Jul 2018 17:50:53 +0000 Subject: [PATCH] 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 --- llvm/include/llvm/ADT/Any.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/llvm/include/llvm/ADT/Any.h b/llvm/include/llvm/ADT/Any.h index 2be15bb..c64c399 100644 --- a/llvm/include/llvm/ADT/Any.h +++ b/llvm/include/llvm/ADT/Any.h @@ -25,7 +25,7 @@ namespace llvm { class Any { - template struct TypeId { static const char Id = 0; }; + template struct TypeId { static const char Id; }; struct StorageBase { virtual ~StorageBase() = default; @@ -99,6 +99,9 @@ private: std::unique_ptr Storage; }; +template const char Any::TypeId::Id = 0; + + template bool any_isa(const Any &Value) { if (!Value.Storage) return false; -- 2.7.4