From: Duncan P. N. Exon Smith Date: Mon, 20 Apr 2015 21:29:44 +0000 (+0000) Subject: DebugInfo: Fix Kaleidoscope Ch. 8 after r235327 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6219380952f0cedef590175f858b683bbf8db971;hp=92b3bf95a1846e16bb85929544747b1c074b2fab;p=oota-llvm.git 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). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235353 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/examples/Kaleidoscope/Chapter8/toy.cpp b/examples/Kaleidoscope/Chapter8/toy.cpp index 7b714cac7c6..eb16516b6d2 100644 --- a/examples/Kaleidoscope/Chapter8/toy.cpp +++ b/examples/Kaleidoscope/Chapter8/toy.cpp @@ -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