浏览代码

changes with venom that made it compile

Andrea Gussoni 8 年之前
父节点
当前提交
8aa3e8d4f1
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      source/CMakeLists.txt
  2. 1 1
      source/JIT.cpp

+ 1 - 1
source/CMakeLists.txt

@@ -21,7 +21,7 @@ add_executable(kaleidoscope Main.cpp Lexer.cpp Parser.cpp Ast.cpp JIT.cpp)
 
 # Find the libraries that correspond to the LLVM components
 # that we wish to use
-llvm_map_components_to_libnames(llvm_libs core support native mcjit object scalaropts instcombine RuntimeDyld ExecutionEngine)
+llvm_map_components_to_libnames(llvm_libs core support native mcjit object scalaropts instcombine RuntimeDyld ExecutionEngine TransformUtils)
 
 # Link against LLVM libraries
 target_link_libraries(kaleidoscope ${llvm_libs})

+ 1 - 1
source/JIT.cpp

@@ -27,7 +27,7 @@ void InitializeModuleAndPassManager(void) {
   // HACK:: removed because not present in the full code listing and because of
   // errors in linking phase (libLLVMTransformUtils)
   // Promote allocas to registers.
-  //JITObjects::TheFPM->add(createPromoteMemoryToRegisterPass());
+  JITObjects::TheFPM->add(createPromoteMemoryToRegisterPass());
   // Do simple "peephole" optimizations and bit-twiddling optzns.
   JITObjects::TheFPM->add(createInstructionCombiningPass());
   // Reassociate expressions.