summaryrefslogtreecommitdiff
path: root/include/llvm-c/Target.h
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2011-11-29 00:06:55 +0000
committerDaniel Dunbar <daniel@zuster.org>2011-11-29 00:06:55 +0000
commit72736d1aa3a731cdbdef2ad7e3a861c5afd7fce7 (patch)
tree602595881abb3eade2c5e473b104b5c4beadc3cd /include/llvm-c/Target.h
parente68c29b74d376b7c90ee17df709fafec23edd16e (diff)
downloadllvm-72736d1aa3a731cdbdef2ad7e3a861c5afd7fce7.tar.gz
llvm-72736d1aa3a731cdbdef2ad7e3a861c5afd7fce7.tar.bz2
llvm-72736d1aa3a731cdbdef2ad7e3a861c5afd7fce7.tar.xz
llvm-c: Add a few missing InitializeAll* functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145330 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm-c/Target.h')
-rw-r--r--include/llvm-c/Target.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/include/llvm-c/Target.h b/include/llvm-c/Target.h
index 7afaef15c4..e4f177beb9 100644
--- a/include/llvm-c/Target.h
+++ b/include/llvm-c/Target.h
@@ -47,6 +47,21 @@ typedef struct LLVMStructLayout *LLVMStructLayoutRef;
#include "llvm/Config/Targets.def"
#undef LLVM_TARGET /* Explicit undef to make SWIG happier */
+/* Declare all of the available assembly printer initialization functions. */
+#define LLVM_ASM_PRINTER(TargetName) \
+ void LLVMInitialize##TargetName##AsmPrinter();
+#include "llvm/Config/AsmPrinters.def"
+
+/* Declare all of the available assembly parser initialization functions. */
+#define LLVM_ASM_PARSER(TargetName) \
+ void LLVMInitialize##TargetName##AsmParser();
+#include "llvm/Config/AsmParsers.def"
+
+/* Declare all of the available disassembler initialization functions. */
+#define LLVM_DISASSEMBLER(TargetName) \
+ void LLVMInitialize##TargetName##Disassembler();
+#include "llvm/Config/Disassemblers.def"
+
/** LLVMInitializeAllTargetInfos - The main program should call this function if
it wants access to all available targets that LLVM is configured to
support. */
@@ -64,6 +79,43 @@ static inline void LLVMInitializeAllTargets(void) {
#include "llvm/Config/Targets.def"
#undef LLVM_TARGET /* Explicit undef to make SWIG happier */
}
+
+/** LLVMInitializeAllTargetMCs - The main program should call this function if
+ it wants access to all available target MC that LLVM is configured to
+ support. */
+static inline void LLVMInitializeAllTargetMCs(void) {
+#define LLVM_TARGET(TargetName) LLVMInitialize##TargetName##TargetMC();
+#include "llvm/Config/Targets.def"
+#undef LLVM_TARGET /* Explicit undef to make SWIG happier */
+}
+
+/** LLVMInitializeAllAsmPrinters - The main program should call this function if
+ it wants all asm printers that LLVM is configured to support, to make them
+ available via the TargetRegistry. */
+static inline void LLVMInitializeAllAsmPrinters() {
+#define LLVM_ASM_PRINTER(TargetName) LLVMInitialize##TargetName##AsmPrinter();
+#include "llvm/Config/AsmPrinters.def"
+#undef LLVM_ASM_PRINTER /* Explicit undef to make SWIG happier */
+}
+
+/** LLVMInitializeAllAsmParsers - The main program should call this function if
+ it wants all asm parsers that LLVM is configured to support, to make them
+ available via the TargetRegistry. */
+static inline void LLVMInitializeAllAsmParsers() {
+#define LLVM_ASM_PARSER(TargetName) LLVMInitialize##TargetName##AsmParser();
+#include "llvm/Config/AsmParsers.def"
+#undef LLVM_ASM_PARSER /* Explicit undef to make SWIG happier */
+}
+
+/** LLVMInitializeAllDisassemblers - The main program should call this function
+ if it wants all disassemblers that LLVM is configured to support, to make
+ them available via the TargetRegistry. */
+static inline void LLVMInitializeAllDisassemblers() {
+#define LLVM_DISASSEMBLER(TargetName) \
+ LLVMInitialize##TargetName##Disassembler();
+#include "llvm/Config/Disassemblers.def"
+#undef LLVM_DISASSEMBLER /* Explicit undef to make SWIG happier */
+}
/** LLVMInitializeNativeTarget - The main program should call this function to
initialize the native target corresponding to the host. This is useful