summaryrefslogtreecommitdiffstats
path: root/llvm/examples
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/examples')
-rw-r--r--llvm/examples/Kaleidoscope/Chapter8/toy.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/examples/Kaleidoscope/Chapter8/toy.cpp b/llvm/examples/Kaleidoscope/Chapter8/toy.cpp
index 7eaf16caa07..289209b3df4 100644
--- a/llvm/examples/Kaleidoscope/Chapter8/toy.cpp
+++ b/llvm/examples/Kaleidoscope/Chapter8/toy.cpp
@@ -1251,7 +1251,8 @@ Function *FunctionAST::codegen() {
FContext, P.getName(), StringRef(), Unit, LineNo,
CreateFunctionType(TheFunction->arg_size(), Unit),
false /* internal linkage */, true /* definition */, ScopeLine,
- DINode::FlagPrototyped, false, TheFunction);
+ DINode::FlagPrototyped, false);
+ TheFunction->setSubprogram(SP);
// Push the current scope.
KSDbgInfo.LexicalBlocks.push_back(SP);
OpenPOWER on IntegriCloud