Instantiate Registry<GCStrategy> in LLVMCore, to let it available on Win32 DLL.
authorNAKAMURA Takumi <geek4civic@gmail.com>
Sun, 25 Jan 2015 15:05:36 +0000 (15:05 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Sun, 25 Jan 2015 15:05:36 +0000 (15:05 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227046 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/IR/GCStrategy.h
lib/IR/GCStrategy.cpp

index 15acfe4..c9b0a84 100644 (file)
@@ -188,6 +188,9 @@ public:
 /// register your GCMetadataPrinter subclass with the
 /// GCMetadataPrinterRegistery as well.
 typedef Registry<GCStrategy> GCRegistry;
+
+/// GCStrategy is instantiated in GCStrategy.cpp.
+extern template class Registry<GCStrategy>;
 }
 
 #endif
index 56e6946..b451310 100644 (file)
@@ -14,6 +14,8 @@
 
 #include "llvm/IR/GCStrategy.h"
 
+template class llvm::Registry<llvm::GCStrategy>;
+
 using namespace llvm;
 
 GCStrategy::GCStrategy()