diff options
| author | Adrian Prantl <aprantl@apple.com> | 2014-01-03 23:34:30 +0000 |
|---|---|---|
| committer | Adrian Prantl <aprantl@apple.com> | 2014-01-03 23:34:30 +0000 |
| commit | d22d777d6d1383ebc61e5e6814607955cab41266 (patch) | |
| tree | 1c692a06fe3780961db9c4db65f83516c0260473 /lib/CodeGen/CodeGenFunction.cpp | |
| parent | 09e3c5f7eb4326ec41fcaeb50f62e261072e8222 (diff) | |
| download | clang-d22d777d6d1383ebc61e5e6814607955cab41266.tar.gz clang-d22d777d6d1383ebc61e5e6814607955cab41266.tar.bz2 clang-d22d777d6d1383ebc61e5e6814607955cab41266.tar.xz | |
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
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.cpp')
| -rw-r--r-- | lib/CodeGen/CodeGenFunction.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
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). |
