[llvm-c] Add functions for initializing native AsmPrinter, AsmParser & Disassembler

Original patch by Chris Wailes

llvm-svn: 194140
This commit is contained in:
Peter Zotov 2013-11-06 09:21:35 +00:00
parent 34ddbf1a7e
commit 04f5981996
1 changed files with 36 additions and 0 deletions

View File

@ -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.