diff options
Diffstat (limited to 'include/llvm/Target/TargetSelect.h')
-rw-r--r-- | include/llvm/Target/TargetSelect.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/llvm/Target/TargetSelect.h b/include/llvm/Target/TargetSelect.h index 99c52ac746..272ee09464 100644 --- a/include/llvm/Target/TargetSelect.h +++ b/include/llvm/Target/TargetSelect.h @@ -27,6 +27,10 @@ extern "C" { #include "llvm/Config/Targets.def" #define LLVM_TARGET(TargetName) \ + void LLVMInitialize##TargetName##MCAsmInfo(); +#include "llvm/Config/Targets.def" + +#define LLVM_TARGET(TargetName) \ void LLVMInitialize##TargetName##MCInstrInfo(); #include "llvm/Config/Targets.def" @@ -72,6 +76,17 @@ namespace llvm { #include "llvm/Config/Targets.def" } + /// InitializeAllMCAsmInfos - The main program should call this function + /// if it wants access to all available assembly infos for targets that + /// LLVM is configured to support, to make them available via the + /// TargetRegistry. + /// + /// It is legal for a client to make multiple calls to this function. + inline void InitializeAllMCAsmInfos() { +#define LLVM_TARGET(TargetName) LLVMInitialize##TargetName##MCAsmInfo(); +#include "llvm/Config/Targets.def" + } + /// InitializeAllMCInstrInfos - The main program should call this function /// if it wants access to all available instruction infos for targets that /// LLVM is configured to support, to make them available via the @@ -133,6 +148,7 @@ namespace llvm { #ifdef LLVM_NATIVE_TARGET LLVM_NATIVE_TARGETINFO(); LLVM_NATIVE_TARGET(); + LLVM_NATIVE_MCASMINFO(); return false; #else return true; |