summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2014-07-11 15:06:24 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2014-07-11 15:06:24 +0000
commitad4c06c656d124366325116124bd278522dd12ce (patch)
treefe9c030ab79e40548cd4d49b916a1a3c542f3ba7
parent767ee965343ba5c8297a010afc19c31d946bb3be (diff)
downloadbcm5719-llvm-ad4c06c656d124366325116124bd278522dd12ce.tar.gz
bcm5719-llvm-ad4c06c656d124366325116124bd278522dd12ce.zip
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. llvm-svn: 212821
-rw-r--r--clang/examples/PrintFunctionNames/PrintFunctionNames.exports1
-rw-r--r--clang/include/clang/Frontend/FrontendPluginRegistry.h3
-rw-r--r--clang/lib/Frontend/FrontendAction.cpp2
3 files changed, 5 insertions, 1 deletions
diff --git a/clang/examples/PrintFunctionNames/PrintFunctionNames.exports b/clang/examples/PrintFunctionNames/PrintFunctionNames.exports
index 0ff590d30d7..e69de29bb2d 100644
--- a/clang/examples/PrintFunctionNames/PrintFunctionNames.exports
+++ b/clang/examples/PrintFunctionNames/PrintFunctionNames.exports
@@ -1 +0,0 @@
-_ZN4llvm8Registry*
diff --git a/clang/include/clang/Frontend/FrontendPluginRegistry.h b/clang/include/clang/Frontend/FrontendPluginRegistry.h
index ec925adb018..49be495daa3 100644
--- a/clang/include/clang/Frontend/FrontendPluginRegistry.h
+++ b/clang/include/clang/Frontend/FrontendPluginRegistry.h
@@ -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.
diff --git a/clang/lib/Frontend/FrontendAction.cpp b/clang/lib/Frontend/FrontendAction.cpp
index c274ba71768..791017924d6 100644
--- a/clang/lib/Frontend/FrontendAction.cpp
+++ b/clang/lib/Frontend/FrontendAction.cpp
@@ -32,6 +32,8 @@
#include <system_error>
using namespace clang;
+template class llvm::Registry<clang::PluginASTAction>;
+
namespace {
class DelegatingDeserializationListener : public ASTDeserializationListener {
OpenPOWER on IntegriCloud