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 | 96e70d9148df9f62c0e0d9ff6368b90c0b440c97 (patch) | |
tree | 2d60d5d816c8e0495c5907c2e3dd569923e68e34 /clang/lib/CodeGen/CodeGenFunction.cpp | |
parent | ceb16dedefc7833b3f3b7305e751ad9ba748d99b (diff) | |
download | bcm5719-llvm-96e70d9148df9f62c0e0d9ff6368b90c0b440c97.tar.gz bcm5719-llvm-96e70d9148df9f62c0e0d9ff6368b90c0b440c97.zip |
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
llvm-svn: 198461
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp index cebd6a7df1d..2d8c68e5f8d 100644 --- a/clang/lib/CodeGen/CodeGenFunction.cpp +++ b/clang/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). |