From d22d777d6d1383ebc61e5e6814607955cab41266 Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Fri, 3 Jan 2014 23:34:30 +0000 Subject: Debug info: Ensure that the last stop point in a function is still within the lexical block formed by the compound statement that is the function body. rdar://problem/15010825 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198461 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CodeGenFunction.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/CodeGen/CodeGenFunction.cpp') diff --git a/lib/CodeGen/CodeGenFunction.cpp b/lib/CodeGen/CodeGenFunction.cpp index cebd6a7df1..2d8c68e5f8 100644 --- a/lib/CodeGen/CodeGenFunction.cpp +++ b/lib/CodeGen/CodeGenFunction.cpp @@ -207,9 +207,10 @@ void CodeGenFunction::FinishFunction(SourceLocation EndLoc) { // all will be fine. if (CGDebugInfo *DI = getDebugInfo()) { if (OnlySimpleReturnStmts) - DI->EmitLocation(Builder, LastStopPoint); + DI->EmitLocation(Builder, LastStopPoint.first, + false, LastStopPoint.second); else - DI->EmitLocation(Builder, EndLoc); + DI->EmitLocation(Builder, EndLoc, false, LastStopPoint.second); } // Pop any cleanups that might have been associated with the @@ -226,7 +227,7 @@ void CodeGenFunction::FinishFunction(SourceLocation EndLoc) { if (CGDebugInfo *DI = getDebugInfo()) if (OnlySimpleReturnStmts) - DI->EmitLocation(Builder, EndLoc); + DI->EmitLocation(Builder, EndLoc, false, LastStopPoint.second); } // Emit function epilog (to return). -- cgit v1.2.3