projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7270177
)
[examples] Fix Kaleidoscope-Ch3, which was broken by ad92f16ccc5.
author
Lang Hames
<lhames@gmail.com>
Mon, 19 Oct 2020 07:25:15 +0000
(
00:25
-0700)
committer
Lang Hames
<lhames@gmail.com>
Mon, 19 Oct 2020 07:26:43 +0000
(
00:26
-0700)
llvm/examples/Kaleidoscope/Chapter3/toy.cpp
patch
|
blob
|
history
diff --git
a/llvm/examples/Kaleidoscope/Chapter3/toy.cpp
b/llvm/examples/Kaleidoscope/Chapter3/toy.cpp
index
61adfbc
..
0356300
100644
(file)
--- a/
llvm/examples/Kaleidoscope/Chapter3/toy.cpp
+++ b/
llvm/examples/Kaleidoscope/Chapter3/toy.cpp
@@
-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.
@@
-564,8
+561,8
@@
static void HandleTopLevelExpression() {
FnIR->print(errs());
fprintf(stderr, "\n");
- // Re
set the module
.
-
InitializeModule
();
+ // Re
move the anonymous expression
.
+
FnIR->eraseFromParent
();
}
} else {
// Skip token for error recovery.