summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2018-07-20 17:50:53 +0000
committerZachary Turner <zturner@google.com>2018-07-20 17:50:53 +0000
commita219bae1b750df8a1eb171c2e8d3a06fef795e2c (patch)
tree77387974b65b82e7166f8f272707410956115583
parentfa07bb646cc39f4f218ab59aac4da813edc9053d (diff)
downloadbcm5719-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.h5
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;
OpenPOWER on IntegriCloud