Cleanup: Use a member variable to store the SourceLocation for EH code.

rdar://problem/13888152

llvm-svn: 181957
This commit is contained in:
Adrian Prantl
2013-05-16 00:41:26 +00:00
parent ff1596c2a1
commit dc237b52bc
3 changed files with 12 additions and 13 deletions

View File

@@ -209,7 +209,7 @@ void CodeGenFunction::FinishFunction(SourceLocation EndLoc) {
// edges will be *really* confused.
bool EmitRetDbgLoc = true;
if (EHStack.stable_begin() != PrologueCleanupDepth) {
PopCleanupBlocks(PrologueCleanupDepth, EndLoc);
PopCleanupBlocks(PrologueCleanupDepth);
// Make sure the line table doesn't jump back into the body for
// the ret after it's been at EndLoc.
@@ -666,6 +666,7 @@ void CodeGenFunction::GenerateCode(GlobalDecl GD, llvm::Function *Fn,
SourceRange BodyRange;
if (Stmt *Body = FD->getBody()) BodyRange = Body->getSourceRange();
CurEHLocation = BodyRange.getEnd();
// CalleeWithThisReturn keeps track of the last callee inside this function
// that returns 'this'. Before starting the function, we set it to null.