diff options
Diffstat (limited to 'examples/Kaleidoscope/BuildingAJIT/Chapter4')
-rw-r--r-- | examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h | 4 | ||||
-rw-r--r-- | examples/Kaleidoscope/BuildingAJIT/Chapter4/toy.cpp | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h b/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h index 527d4be09f0f..e0a78410f713 100644 --- a/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h +++ b/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h @@ -24,7 +24,7 @@ #include "llvm/ExecutionEngine/Orc/IRCompileLayer.h" #include "llvm/ExecutionEngine/Orc/IRTransformLayer.h" #include "llvm/ExecutionEngine/Orc/LambdaResolver.h" -#include "llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h" +#include "llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h" #include "llvm/IR/DataLayout.h" #include "llvm/IR/LegacyPassManager.h" #include "llvm/IR/Mangler.h" @@ -73,7 +73,7 @@ class KaleidoscopeJIT { private: std::unique_ptr<TargetMachine> TM; const DataLayout DL; - ObjectLinkingLayer<> ObjectLayer; + RTDyldObjectLinkingLayer<> ObjectLayer; IRCompileLayer<decltype(ObjectLayer)> CompileLayer; typedef std::function<std::unique_ptr<Module>(std::unique_ptr<Module>)> diff --git a/examples/Kaleidoscope/BuildingAJIT/Chapter4/toy.cpp b/examples/Kaleidoscope/BuildingAJIT/Chapter4/toy.cpp index 07981a8f79b7..ff4b5220105b 100644 --- a/examples/Kaleidoscope/BuildingAJIT/Chapter4/toy.cpp +++ b/examples/Kaleidoscope/BuildingAJIT/Chapter4/toy.cpp @@ -1126,7 +1126,8 @@ static void HandleExtern() { if (auto ProtoAST = ParseExtern()) { if (auto *FnIR = ProtoAST->codegen()) { fprintf(stderr, "Read extern: "); - FnIR->dump(); + FnIR->print(errs()); + fprintf(stderr, "\n"); FunctionProtos[ProtoAST->getName()] = std::move(ProtoAST); } } else { |