summaryrefslogtreecommitdiffstats
path: root/llvm/examples/Kaleidoscope/Orc/initial/toy.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2015-02-08 21:03:30 +0000
committerDavid Blaikie <dblaikie@gmail.com>2015-02-08 21:03:30 +0000
commit9c4c23b32e21df81de54e1f51df93ec77a55acfb (patch)
tree48a314e6009798095fc8eda70eeca90d5dc1f22c /llvm/examples/Kaleidoscope/Orc/initial/toy.cpp
parentbae16b3f5355e50bb4a0d5265f5304142a6afc0b (diff)
downloadbcm5719-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.cpp6
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));
}
OpenPOWER on IntegriCloud