[llvm-c] Correctly check for existence of native AsmParser, AsmPrinter, Disassembler
authorPeter Zotov <whitequark@whitequark.org>
Wed, 6 Nov 2013 09:45:53 +0000 (09:45 +0000)
committerPeter Zotov <whitequark@whitequark.org>
Wed, 6 Nov 2013 09:45:53 +0000 (09:45 +0000)
Also, properly name the functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194141 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm-c/Target.h

index 834b63a475ae8cc5f180d5b02676456bb6bf7cb7..7261b0f9914bd9c55c1d9ceaf56c0a7133491796 100644 (file)
@@ -149,8 +149,8 @@ static inline LLVMBool LLVMInitializeNativeTarget(void) {
 /** 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
+static inline LLVMBool LLVMInitializeNativeAsmParser(void) {
+#ifdef LLVM_NATIVE_ASMPARSER
   LLVM_NATIVE_ASMPARSER();
   return 0;
 #else
@@ -161,8 +161,8 @@ static inline LLVMBool LLVMInitializeNativeTargetAsmParser(void) {
 /** 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
+static inline LLVMBool LLVMInitializeNativeAsmPrinter(void) {
+#ifdef LLVM_NATIVE_ASMPRINTER
   LLVM_NATIVE_ASMPRINTER();
   return 0;
 #else
@@ -173,8 +173,8 @@ static inline LLVMBool LLVMInitializeNativeTargetAsmPrinter(void) {
 /** 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
+static inline LLVMBool LLVMInitializeNativeDisassembler(void) {
+#ifdef LLVM_NATIVE_DISASSEMBLER
   LLVM_NATIVE_DISASSEMBLER();
   return 0;
 #else