r212821 - Instantiate llvm::Registry<clang::PluginASTAction> in FrontendAction.cpp.

NAKAMURA Takumi geek4civic at gmail.com
Fri Jul 11 08:06:24 PDT 2014


Author: chapuni
Date: Fri Jul 11 10:06:24 2014
New Revision: 212821

URL: http://llvm.org/viewvc/llvm-project?rev=212821&view=rev
Log:
Instantiate llvm::Registry<clang::PluginASTAction> in FrontendAction.cpp.

  - 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.

Modified:
    cfe/trunk/examples/PrintFunctionNames/PrintFunctionNames.exports
    cfe/trunk/include/clang/Frontend/FrontendPluginRegistry.h
    cfe/trunk/lib/Frontend/FrontendAction.cpp

Modified: cfe/trunk/examples/PrintFunctionNames/PrintFunctionNames.exports
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/examples/PrintFunctionNames/PrintFunctionNames.exports?rev=212821&r1=212820&r2=212821&view=diff
==============================================================================
--- cfe/trunk/examples/PrintFunctionNames/PrintFunctionNames.exports (original)
+++ cfe/trunk/examples/PrintFunctionNames/PrintFunctionNames.exports Fri Jul 11 10:06:24 2014
@@ -1 +0,0 @@
-_ZN4llvm8Registry*

Modified: cfe/trunk/include/clang/Frontend/FrontendPluginRegistry.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Frontend/FrontendPluginRegistry.h?rev=212821&r1=212820&r2=212821&view=diff
==============================================================================
--- cfe/trunk/include/clang/Frontend/FrontendPluginRegistry.h (original)
+++ cfe/trunk/include/clang/Frontend/FrontendPluginRegistry.h Fri Jul 11 10:06:24 2014
@@ -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.

Modified: cfe/trunk/lib/Frontend/FrontendAction.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/FrontendAction.cpp?rev=212821&r1=212820&r2=212821&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/FrontendAction.cpp (original)
+++ cfe/trunk/lib/Frontend/FrontendAction.cpp Fri Jul 11 10:06:24 2014
@@ -32,6 +32,8 @@
 #include <system_error>
 using namespace clang;
 
+template class llvm::Registry<clang::PluginASTAction>;
+
 namespace {
 
 class DelegatingDeserializationListener : public ASTDeserializationListener {





More information about the cfe-commits mailing list