diff options
author | Peter Zotov <whitequark@whitequark.org> | 2013-11-06 09:21:35 +0000 |
---|---|---|
committer | Peter Zotov <whitequark@whitequark.org> | 2013-11-06 09:21:35 +0000 |
commit | 04f59819961ce5d7b2c874fc8a44486157252def (patch) | |
tree | 67b0c386ac766b04602afa2e1e7b19bd0df3fe46 /llvm/include/llvm-c | |
parent | 34ddbf1a7e524950a0a28ecf268a011515ee39a2 (diff) | |
download | bcm5719-llvm-04f59819961ce5d7b2c874fc8a44486157252def.tar.gz bcm5719-llvm-04f59819961ce5d7b2c874fc8a44486157252def.zip |
[llvm-c] Add functions for initializing native AsmPrinter, AsmParser & Disassembler
Original patch by Chris Wailes
llvm-svn: 194140
Diffstat (limited to 'llvm/include/llvm-c')
-rw-r--r-- | llvm/include/llvm-c/Target.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/llvm/include/llvm-c/Target.h b/llvm/include/llvm-c/Target.h index 71a24819eac..834b63a475a 100644 --- a/llvm/include/llvm-c/Target.h +++ b/llvm/include/llvm-c/Target.h @@ -146,6 +146,42 @@ static inline LLVMBool LLVMInitializeNativeTarget(void) { #endif } +/** LLVMInitializeNativeTargetAsmParser - The main program should call this + function to initialize the parser for the native target corresponding to the + host. */ +static inline LLVMBool LLVMInitializeNativeTargetAsmParser(void) { +#ifdef LLVM_NATIVE_TARGET + LLVM_NATIVE_ASMPARSER(); + return 0; +#else + return 1; +#endif +} + +/** LLVMInitializeNativeTargetAsmPrinter - The main program should call this + function to initialize the printer for the native target corresponding to + the host. */ +static inline LLVMBool LLVMInitializeNativeTargetAsmPrinter(void) { +#ifdef LLVM_NATIVE_TARGET + LLVM_NATIVE_ASMPRINTER(); + return 0; +#else + return 1; +#endif +} + +/** LLVMInitializeNativeTargetDisassembler - The main program should call this + function to initialize the disassembler for the native target corresponding + to the host. */ +static inline LLVMBool LLVMInitializeNativeTargetDisassembler(void) { +#ifdef LLVM_NATIVE_TARGET + LLVM_NATIVE_DISASSEMBLER(); + return 0; +#else + return 1; +#endif +} + /*===-- Target Data -------------------------------------------------------===*/ /** Creates target data from a target layout string. |