forked from OSchip/llvm-project
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
This commit is contained in:
parent
fa07bb646c
commit
a219bae1b7
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue