Debug info: Implement a cleaner version of r198461. For symmetry with
C and C++ don't emit an extra lexical scope for the compound statement that is the body of an Objective-C method. rdar://problem/15010825 llvm-svn: 198699
This commit is contained in:
@@ -209,10 +209,9 @@ void CodeGenFunction::FinishFunction(SourceLocation EndLoc) {
|
||||
// all will be fine.
|
||||
if (CGDebugInfo *DI = getDebugInfo()) {
|
||||
if (OnlySimpleReturnStmts)
|
||||
DI->EmitLocation(Builder, LastStopPoint.first,
|
||||
false, LastStopPoint.second);
|
||||
DI->EmitLocation(Builder, LastStopPoint, false);
|
||||
else
|
||||
DI->EmitLocation(Builder, EndLoc, false, LastStopPoint.second);
|
||||
DI->EmitLocation(Builder, EndLoc, false);
|
||||
}
|
||||
|
||||
// Pop any cleanups that might have been associated with the
|
||||
@@ -229,7 +228,7 @@ void CodeGenFunction::FinishFunction(SourceLocation EndLoc) {
|
||||
|
||||
if (CGDebugInfo *DI = getDebugInfo())
|
||||
if (OnlySimpleReturnStmts)
|
||||
DI->EmitLocation(Builder, EndLoc, false, LastStopPoint.second);
|
||||
DI->EmitLocation(Builder, EndLoc, false);
|
||||
}
|
||||
|
||||
// Emit function epilog (to return).
|
||||
|
||||
Reference in New Issue
Block a user