Add InitializeNativeAsmParser function.
[oota-llvm.git] / include / llvm / Target / TargetSelect.h
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