Add InitializeNativeAsmParser function.
authorJan Sjödin <jan_sjodin@yahoo.com>
Wed, 9 Mar 2011 17:25:46 +0000 (17:25 +0000)
committerJan Sjödin <jan_sjodin@yahoo.com>
Wed, 9 Mar 2011 17:25:46 +0000 (17:25 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127341 91177308-0d34-0410-b5e6-96231b3b80d8

configure
include/llvm/Config/config.h.in
include/llvm/Config/llvm-config.h.cmake
include/llvm/Config/llvm-config.h.in
include/llvm/Target/TargetSelect.h

index 7a057082de2da9c7de01ecf37ede3b64fc2c0ade..d021372ad553361217fa7122fe73ece5620556ad 100755 (executable)
--- a/configure
+++ b/configure
@@ -5117,6 +5117,7 @@ _ACEOF
     LLVM_NATIVE_TARGET="LLVMInitialize${LLVM_NATIVE_ARCH}Target"
     LLVM_NATIVE_TARGETINFO="LLVMInitialize${LLVM_NATIVE_ARCH}TargetInfo"
     LLVM_NATIVE_ASMPRINTER="LLVMInitialize${LLVM_NATIVE_ARCH}AsmPrinter"
+    LLVM_NATIVE_ASMPARSER="LLVMInitialize${LLVM_NATIVE_ARCH}AsmParser"
 
 cat >>confdefs.h <<_ACEOF
 #define LLVM_NATIVE_TARGET $LLVM_NATIVE_TARGET
@@ -5132,6 +5133,11 @@ cat >>confdefs.h <<_ACEOF
 #define LLVM_NATIVE_ASMPRINTER $LLVM_NATIVE_ASMPRINTER
 _ACEOF
 
+
+cat >>confdefs.h <<_ACEOF
+#define LLVM_NATIVE_ASMPARSER $LLVM_NATIVE_ASMPARSER
+_ACEOF
+
   fi
 done
 
@@ -11561,7 +11567,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 11564 "configure"
+#line 11570 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
index 14c44b4b1e20a5b8316f39c0ee43c87e9a553964..29f5c93e3c4af04e536f6444ed42facd711f4325 100644 (file)
 /* LLVM architecture name for the native architecture, if available */
 #undef LLVM_NATIVE_ARCH
 
+/* LLVM name for the native AsmParser init function, if available */
+#undef LLVM_NATIVE_ASMPARSER
+
 /* LLVM name for the native AsmPrinter init function, if available */
 #undef LLVM_NATIVE_ASMPRINTER
 
index 33a40350d5c05015f71fec68f6e1891817394716..9a9cb3b739ea3e10307e5fc9f41136751c861695 100644 (file)
@@ -61,6 +61,9 @@
 /* LLVM name for the native AsmPrinter init function, if available */
 #cmakedefine LLVM_NATIVE_ASMPRINTER LLVMInitialize${LLVM_NATIVE_ARCH}AsmPrinter
 
+/* LLVM name for the native AsmPrinter init function, if available */
+#cmakedefine LLVM_NATIVE_ASMPARSER LLVMInitialize${LLVM_NATIVE_ARCH}AsmParser
+
 /* Define if this is Unixish platform */
 #cmakedefine LLVM_ON_UNIX ${LLVM_ON_UNIX}
 
index e7a04ee91bb962c17bd5135fdba0197d0e86bd5c..4766a7a2b245df6f323576c00f201c5a058c258a 100644 (file)
@@ -61,6 +61,9 @@
 /* LLVM name for the native AsmPrinter init function, if available */
 #undef LLVM_NATIVE_ASMPRINTER
 
+/* LLVM name for the native AsmPrinter init function, if available */
+#undef LLVM_NATIVE_ASMPARSER
+
 /* Define if this is Unixish platform */
 #undef LLVM_ON_UNIX
 
index 1891f879741a147e9c57def3f68d6fb29daad8c8..c5ab90b0e03dc62e9eb835080e814d3d9cf77dbe 100644 (file)
@@ -120,6 +120,19 @@ namespace llvm {
     return true;
 #endif
   }  
+
+  /// InitializeNativeTargetAsmParser - The main program should call
+  /// this function to initialize the native target asm parser.
+  inline bool InitializeNativeTargetAsmParser() {
+  // If we have a native target, initialize the corresponding asm parser.
+#ifdef LLVM_NATIVE_ASMPARSER
+    LLVM_NATIVE_ASMPARSER();
+    return false;
+#else
+    return true;
+#endif
+  }  
+
 }
 
 #endif