lli: Initialize the native asm parser for inline assembly.
authorJim Grosbach <grosbach@apple.com>
Mon, 5 Nov 2012 19:06:05 +0000 (19:06 +0000)
committerJim Grosbach <grosbach@apple.com>
Mon, 5 Nov 2012 19:06:05 +0000 (19:06 +0000)
MCJIT supports inline assembly, but requires the asm parser to do so.
Make sure to link it in and initialize it.

llvm-svn: 167392

llvm/tools/lli/CMakeLists.txt
llvm/tools/lli/LLVMBuild.txt
llvm/tools/lli/Makefile
llvm/tools/lli/lli.cpp

index a9c7adf..ed479f5 100644 (file)
@@ -1,5 +1,5 @@
 
-set(LLVM_LINK_COMPONENTS mcjit jit interpreter nativecodegen bitreader asmparser selectiondag)
+set(LLVM_LINK_COMPONENTS mcjit jit interpreter nativecodegen bitreader asmparser selectiondag native)
 
 if( LLVM_USE_OPROFILE )
   set(LLVM_LINK_COMPONENTS
index 4eb82bd..36ceb39 100644 (file)
@@ -19,4 +19,4 @@
 type = Tool
 name = lli
 parent = Tools
-required_libraries = AsmParser BitReader Interpreter JIT MCJIT NativeCodeGen SelectionDAG
+required_libraries = AsmParser BitReader Interpreter JIT MCJIT NativeCodeGen SelectionDAG Native
index 100fc2e..31f3ab8 100644 (file)
@@ -12,7 +12,7 @@ TOOLNAME := lli
 
 include $(LEVEL)/Makefile.config
 
-LINK_COMPONENTS := mcjit jit interpreter nativecodegen bitreader asmparser selectiondag
+LINK_COMPONENTS := mcjit jit interpreter nativecodegen bitreader asmparser selectiondag native
 
 # If Intel JIT Events support is confiured, link against the LLVM Intel JIT
 # Events interface library
index 22b48cf..9a27a4c 100644 (file)
@@ -508,6 +508,7 @@ int main(int argc, char **argv, char * const *envp) {
   // usable by the JIT.
   InitializeNativeTarget();
   InitializeNativeTargetAsmPrinter();
+  InitializeNativeTargetAsmParser();
 
   cl::ParseCommandLineOptions(argc, argv,
                               "llvm interpreter & dynamic compiler\n");