DebugInfo: Fix Kaleidoscope Ch. 8 after r235327
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Mon, 20 Apr 2015 21:29:44 +0000 (21:29 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Mon, 20 Apr 2015 21:29:44 +0000 (21:29 +0000)
Pretty sure the build was broken by r235327 (I updated it there, but
apparently didn't check if it compiled).

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

examples/Kaleidoscope/Chapter8/toy.cpp

index 7b714cac7c630f94db071aaa73c85c8274e68685..eb16516b6d23c57b87f9bea115dbcfbcaacc906c 100644 (file)
@@ -831,7 +831,7 @@ void DebugInfo::emitLocation(ExprAST *AST) {
   if (LexicalBlocks.empty())
     Scope = TheCU;
   else
-    Scope = *LexicalBlocks.back();
+    Scope = LexicalBlocks.back();
   Builder.SetCurrentDebugLocation(
       DebugLoc::get(AST->getLine(), AST->getCol(), Scope));
 }
@@ -1274,7 +1274,7 @@ Function *FunctionAST::Codegen() {
     return 0;
 
   // Push the current scope.
-  KSDbgInfo.LexicalBlocks.push_back(&KSDbgInfo.FnScopeMap[Proto]);
+  KSDbgInfo.LexicalBlocks.push_back(KSDbgInfo.FnScopeMap[Proto]);
 
   // Unset the location for the prologue emission (leading instructions with no
   // location in a function are considered part of the prologue and the debugger