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-Tag: llvmorg-3.7.0-rc1~6378 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3b6f1d57ea15f9cfe3ae62a17f7da6eb118def83;p=platform%2Fupstream%2Fllvm.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). llvm-svn: 235353 --- diff --git a/llvm/examples/Kaleidoscope/Chapter8/toy.cpp b/llvm/examples/Kaleidoscope/Chapter8/toy.cpp index 7b714ca..eb16516 100644 --- a/llvm/examples/Kaleidoscope/Chapter8/toy.cpp +++ b/llvm/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