diff options
author | David Blaikie <dblaikie@gmail.com> | 2015-02-08 21:03:30 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2015-02-08 21:03:30 +0000 |
commit | 9c4c23b32e21df81de54e1f51df93ec77a55acfb (patch) | |
tree | 48a314e6009798095fc8eda70eeca90d5dc1f22c /llvm/examples/Kaleidoscope/Orc/initial/toy.cpp | |
parent | bae16b3f5355e50bb4a0d5265f5304142a6afc0b (diff) | |
download | bcm5719-llvm-9c4c23b32e21df81de54e1f51df93ec77a55acfb.tar.gz bcm5719-llvm-9c4c23b32e21df81de54e1f51df93ec77a55acfb.zip |
Kaleidoscope-Orc: Reuse the IRGen utility function in later chapters, and remove an unused parameter.
llvm-svn: 228543
Diffstat (limited to 'llvm/examples/Kaleidoscope/Orc/initial/toy.cpp')
-rw-r--r-- | llvm/examples/Kaleidoscope/Orc/initial/toy.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/examples/Kaleidoscope/Orc/initial/toy.cpp b/llvm/examples/Kaleidoscope/Orc/initial/toy.cpp index 1b772259a19..f075af156c2 100644 --- a/llvm/examples/Kaleidoscope/Orc/initial/toy.cpp +++ b/llvm/examples/Kaleidoscope/Orc/initial/toy.cpp @@ -1180,8 +1180,8 @@ private: CompileLayerT CompileLayer; }; -static std::unique_ptr<llvm::Module> -IRGen(KaleidoscopeJIT &J, SessionContext &S, const FunctionAST &F) { +static std::unique_ptr<llvm::Module> IRGen(SessionContext &S, + const FunctionAST &F) { IRGenContext C(S); auto LF = F.IRGen(C); if (!LF) @@ -1195,7 +1195,7 @@ IRGen(KaleidoscopeJIT &J, SessionContext &S, const FunctionAST &F) { static void HandleDefinition(SessionContext &S, KaleidoscopeJIT &J) { if (auto F = ParseDefinition()) { - if (auto M = IRGen(J, S, *F)) { + if (auto M = IRGen(S, *F)) { S.addPrototypeAST(llvm::make_unique<PrototypeAST>(*F->Proto)); J.addModule(std::move(M)); } |