From: Peter Collingbourne <peter@pcc.me.uk>
Date: Thu, 5 Nov 2015 22:18:31 +0000 (+0000)
Subject: Fix Kaleidoscope example.
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=dcbcd42f5cc2cfa490b6e8019fdaf9f4e2fa4f89;p=oota-llvm.git

Fix Kaleidoscope example.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252222 91177308-0d34-0410-b5e6-96231b3b80d8
---

diff --git a/examples/Kaleidoscope/Chapter8/toy.cpp b/examples/Kaleidoscope/Chapter8/toy.cpp
index 7eaf16caa07..289209b3df4 100644
--- a/examples/Kaleidoscope/Chapter8/toy.cpp
+++ b/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);