diff --git a/lib/Extensions/Extensions.cpp b/lib/Extensions/Extensions.cpp index e69de29bb2d..2fe537f9187 100644 --- a/lib/Extensions/Extensions.cpp +++ b/lib/Extensions/Extensions.cpp @@ -0,0 +1,15 @@ +#include "llvm/Passes/PassPlugin.h" +#define HANDLE_EXTENSION(Ext) \ + llvm::PassPluginLibraryInfo get##Ext##PluginInfo(); +#include "llvm/Support/Extension.def" + + +namespace llvm { + namespace details { + void extensions_anchor() { +#define HANDLE_EXTENSION(Ext) \ + static auto Ext = get##Ext##PluginInfo(); +#include "llvm/Support/Extension.def" + } + } +} diff --git a/lib/Extensions/LLVMBuild.txt b/lib/Extensions/LLVMBuild.txt index 2005830a4dd..7a98c8f6805 100644 --- a/lib/Extensions/LLVMBuild.txt +++ b/lib/Extensions/LLVMBuild.txt @@ -18,4 +18,4 @@ type = Library name = Extensions parent = Libraries -required_libraries = +required_libraries = Support