Win32 DLL doesn't merge sections between loader and module.
It is required to instantiate FrontendPluginRegistry in clangFrontend to manage 
plugin registry.

http://llvm-reviews.chandlerc.com/D3025

Files:
  clang/include/clang/Frontend/FrontendPluginRegistry.h
  clang/lib/Frontend/FrontendAction.cpp

Index: clang/include/clang/Frontend/FrontendPluginRegistry.h
===================================================================
--- clang/include/clang/Frontend/FrontendPluginRegistry.h
+++ clang/include/clang/Frontend/FrontendPluginRegistry.h
@@ -13,6 +13,8 @@
 #include "clang/Frontend/FrontendAction.h"
 #include "llvm/Support/Registry.h"
 
+extern template class llvm::Registry<clang::PluginASTAction>;
+
 namespace clang {
 
 /// The frontend plugin registry.
Index: clang/lib/Frontend/FrontendAction.cpp
===================================================================
--- clang/lib/Frontend/FrontendAction.cpp
+++ clang/lib/Frontend/FrontendAction.cpp
@@ -33,6 +33,8 @@
 #include "llvm/Support/system_error.h"
 using namespace clang;
 
+template class llvm::Registry<clang::PluginASTAction>;
+
 namespace {
 
 class DelegatingDeserializationListener : public ASTDeserializationListener {
Index: clang/include/clang/Frontend/FrontendPluginRegistry.h
===================================================================
--- clang/include/clang/Frontend/FrontendPluginRegistry.h
+++ clang/include/clang/Frontend/FrontendPluginRegistry.h
@@ -13,6 +13,8 @@
 #include "clang/Frontend/FrontendAction.h"
 #include "llvm/Support/Registry.h"
 
+extern template class llvm::Registry<clang::PluginASTAction>;
+
 namespace clang {
 
 /// The frontend plugin registry.
Index: clang/lib/Frontend/FrontendAction.cpp
===================================================================
--- clang/lib/Frontend/FrontendAction.cpp
+++ clang/lib/Frontend/FrontendAction.cpp
@@ -33,6 +33,8 @@
 #include "llvm/Support/system_error.h"
 using namespace clang;
 
+template class llvm::Registry<clang::PluginASTAction>;
+
 namespace {
 
 class DelegatingDeserializationListener : public ASTDeserializationListener {
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to