Skip to content

Commit

Permalink
[examples] Fix Kaleidoscope-Ch3, which was broken by ad92f16.
Browse files Browse the repository at this point in the history
  • Loading branch information
lhames committed Oct 19, 2020
1 parent 7270177 commit 7579941
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions llvm/examples/Kaleidoscope/Chapter3/toy.cpp
Expand Up @@ -533,9 +533,6 @@ static void HandleDefinition() {
fprintf(stderr, "Read function definition:");
FnIR->print(errs());
fprintf(stderr, "\n");

// Reset the module.
InitializeModule();
}
} else {
// Skip token for error recovery.
Expand Down Expand Up @@ -564,8 +561,8 @@ static void HandleTopLevelExpression() {
FnIR->print(errs());
fprintf(stderr, "\n");

// Reset the module.
InitializeModule();
// Remove the anonymous expression.
FnIR->eraseFromParent();
}
} else {
// Skip token for error recovery.
Expand Down

0 comments on commit 7579941

Please sign in to comment.