From 48340098988d87327ef4086f7047d92f9c1f85ce Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Sun, 25 Jan 2015 15:05:36 +0000 Subject: [PATCH] Instantiate Registry in LLVMCore, to let it available on Win32 DLL. llvm-svn: 227046 --- llvm/include/llvm/IR/GCStrategy.h | 3 +++ llvm/lib/IR/GCStrategy.cpp | 2 ++ 2 files changed, 5 insertions(+) diff --git a/llvm/include/llvm/IR/GCStrategy.h b/llvm/include/llvm/IR/GCStrategy.h index 15acfe4..c9b0a84 100644 --- a/llvm/include/llvm/IR/GCStrategy.h +++ b/llvm/include/llvm/IR/GCStrategy.h @@ -188,6 +188,9 @@ public: /// register your GCMetadataPrinter subclass with the /// GCMetadataPrinterRegistery as well. typedef Registry GCRegistry; + +/// GCStrategy is instantiated in GCStrategy.cpp. +extern template class Registry; } #endif diff --git a/llvm/lib/IR/GCStrategy.cpp b/llvm/lib/IR/GCStrategy.cpp index 56e6946..b451310 100644 --- a/llvm/lib/IR/GCStrategy.cpp +++ b/llvm/lib/IR/GCStrategy.cpp @@ -14,6 +14,8 @@ #include "llvm/IR/GCStrategy.h" +template class llvm::Registry; + using namespace llvm; GCStrategy::GCStrategy() -- 2.7.4