summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAnders Waldenborg <anders@0x63.nu>2013-10-15 12:08:59 +0000
committerAnders Waldenborg <anders@0x63.nu>2013-10-15 12:08:59 +0000
commit6480db4b3afb0adb0ffcedc6e88e3b3f394a86cf (patch)
treefb5dae0bf434c72c8d6ec1c934d33ab1fdb8aa2a /include
parentf8f993b675568ea6380ad141371c67679a1b9ac4 (diff)
downloadllvm-6480db4b3afb0adb0ffcedc6e88e3b3f394a86cf.tar.gz
llvm-6480db4b3afb0adb0ffcedc6e88e3b3f394a86cf.tar.bz2
llvm-6480db4b3afb0adb0ffcedc6e88e3b3f394a86cf.tar.xz
Add AllTargetsBindings sublibrary instead of having static inlines in the llvm-c headers.
This new library will be linked in when using the "all-targets" component and contains the LLVMInitializeAll* functions. This means that those functions will exist as real symbols in the shared library, and can therefore can be called from bindings that are using ffi the shared library. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192690 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm-c/Target.h47
1 files changed, 11 insertions, 36 deletions
diff --git a/include/llvm-c/Target.h b/include/llvm-c/Target.h
index 80fc3e5ad7..1d7884f142 100644
--- a/include/llvm-c/Target.h
+++ b/include/llvm-c/Target.h
@@ -71,62 +71,37 @@ typedef struct LLVMStructLayout *LLVMStructLayoutRef;
void LLVMInitialize##TargetName##Disassembler(void);
#include "llvm/Config/Disassemblers.def"
#undef LLVM_DISASSEMBLER /* Explicit undef to make SWIG happier */
-
+
/** LLVMInitializeAllTargetInfos - The main program should call this function if
it wants access to all available targets that LLVM is configured to
support. */
-static inline void LLVMInitializeAllTargetInfos(void) {
-#define LLVM_TARGET(TargetName) LLVMInitialize##TargetName##TargetInfo();
-#include "llvm/Config/Targets.def"
-#undef LLVM_TARGET /* Explicit undef to make SWIG happier */
-}
+void LLVMInitializeAllTargetInfos(void);
/** LLVMInitializeAllTargets - The main program should call this function if it
wants to link in all available targets that LLVM is configured to
support. */
-static inline void LLVMInitializeAllTargets(void) {
-#define LLVM_TARGET(TargetName) LLVMInitialize##TargetName##Target();
-#include "llvm/Config/Targets.def"
-#undef LLVM_TARGET /* Explicit undef to make SWIG happier */
-}
+void LLVMInitializeAllTargets(void);
/** 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 */
-}
-
+void LLVMInitializeAllTargetMCs(void);
+
/** 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(void) {
-#define LLVM_ASM_PRINTER(TargetName) LLVMInitialize##TargetName##AsmPrinter();
-#include "llvm/Config/AsmPrinters.def"
-#undef LLVM_ASM_PRINTER /* Explicit undef to make SWIG happier */
-}
-
+void LLVMInitializeAllAsmPrinters(void);
+
/** 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(void) {
-#define LLVM_ASM_PARSER(TargetName) LLVMInitialize##TargetName##AsmParser();
-#include "llvm/Config/AsmParsers.def"
-#undef LLVM_ASM_PARSER /* Explicit undef to make SWIG happier */
-}
-
+void LLVMInitializeAllAsmParsers(void);
+
/** 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(void) {
-#define LLVM_DISASSEMBLER(TargetName) \
- LLVMInitialize##TargetName##Disassembler();
-#include "llvm/Config/Disassemblers.def"
-#undef LLVM_DISASSEMBLER /* Explicit undef to make SWIG happier */
-}
-
+void LLVMInitializeAllDisassemblers(void);
+
/** LLVMInitializeNativeTarget - The main program should call this function to
initialize the native target corresponding to the host. This is useful
for JIT applications to ensure that the target gets linked in correctly. */