forked from OSchip/llvm-project
Provide anchor for compiler extensions
This patch is cherry-picked from 04b0a4e22e3b4549f9d241f8a9f37eebecb62a31, and amended to prevent an undefined reference to `llvm::EnableABIBreakingChecks'
This commit is contained in:
parent
2168dbf4cc
commit
38778e1087
|
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -18,4 +18,4 @@
|
|||
type = Library
|
||||
name = Extensions
|
||||
parent = Libraries
|
||||
required_libraries =
|
||||
required_libraries = Support
|
||||
|
|
Loading…
Reference in New Issue