[PATCH] Instantiate FrontendPluginRegistry in clangFrontend for win32 to handle plugins.DLL

NAKAMURA Takumi geek4civic at gmail.com
Mon Mar 10 07:46:08 PDT 2014


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 {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D3025.1.patch
Type: text/x-patch
Size: 899 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140310/3fd04680/attachment.bin>


More information about the cfe-commits mailing list