]> granicus.if.org Git - clang/commitdiff
Instantiate llvm::Registry<clang::PluginASTAction> in FrontendAction.cpp.
authorNAKAMURA Takumi <geek4civic@gmail.com>
Fri, 11 Jul 2014 15:06:24 +0000 (15:06 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Fri, 11 Jul 2014 15:06:24 +0000 (15:06 +0000)
  - Plugins don't need to export _ZN4llvm8Registry*.
  - Win32.DLL cannot merge common symbols among DLLs. Static members in llvm::Registry should be instantiated in a parent.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212821 91177308-0d34-0410-b5e6-96231b3b80d8

examples/PrintFunctionNames/PrintFunctionNames.exports
include/clang/Frontend/FrontendPluginRegistry.h
lib/Frontend/FrontendAction.cpp

index 0ff590d30d7bba02d646e97e8ce6719f72d216f4..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1 +0,0 @@
-_ZN4llvm8Registry*
index ec925adb01860846d9510de326c4296bbd11ba6f..49be495daa374908c66991fca32859c874e67280 100644 (file)
@@ -13,6 +13,9 @@
 #include "clang/Frontend/FrontendAction.h"
 #include "llvm/Support/Registry.h"
 
+// Instantiated in FrontendAction.cpp.
+extern template class llvm::Registry<clang::PluginASTAction>;
+
 namespace clang {
 
 /// The frontend plugin registry.
index c274ba71768cef353bef3c542de67a60fb30a87b..791017924d69e26f0da9f02f46acca121b52a1e2 100644 (file)
@@ -32,6 +32,8 @@
 #include <system_error>
 using namespace clang;
 
+template class llvm::Registry<clang::PluginASTAction>;
+
 namespace {
 
 class DelegatingDeserializationListener : public ASTDeserializationListener {