[llvm] r235353 - DebugInfo: Fix Kaleidoscope Ch. 8 after r235327

Duncan P. N. Exon Smith dexonsmith at apple.com
Mon Apr 20 14:29:44 PDT 2015


Author: dexonsmith
Date: Mon Apr 20 16:29:44 2015
New Revision: 235353

URL: http://llvm.org/viewvc/llvm-project?rev=235353&view=rev
Log:
DebugInfo: Fix Kaleidoscope Ch. 8 after r235327

Pretty sure the build was broken by r235327 (I updated it there, but
apparently didn't check if it compiled).

Modified:
    llvm/trunk/examples/Kaleidoscope/Chapter8/toy.cpp

Modified: llvm/trunk/examples/Kaleidoscope/Chapter8/toy.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Chapter8/toy.cpp?rev=235353&r1=235352&r2=235353&view=diff
==============================================================================
--- llvm/trunk/examples/Kaleidoscope/Chapter8/toy.cpp (original)
+++ llvm/trunk/examples/Kaleidoscope/Chapter8/toy.cpp Mon Apr 20 16:29:44 2015
@@ -831,7 +831,7 @@ void DebugInfo::emitLocation(ExprAST *AS
   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





More information about the llvm-commits mailing list