diff options
author | Daniel Dunbar <daniel@zuster.org> | 2008-11-11 20:59:54 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2008-11-11 20:59:54 +0000 |
commit | f5bd45c8e6fa7519cdc17ec3ff4917e279c6a041 (patch) | |
tree | a60e4ad11028042359491e928928e9c376fcba33 /lib/CodeGen/CodeGenFunction.cpp | |
parent | f1c9c09e2e2220e4bbfb7e9d8adf9bf2c2406b80 (diff) |
Emit debug region end in unified return block.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59081 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r-- | lib/CodeGen/CodeGenFunction.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/CodeGen/CodeGenFunction.cpp b/lib/CodeGen/CodeGenFunction.cpp index 1a26610d75..bcd1e09800 100644 --- a/lib/CodeGen/CodeGenFunction.cpp +++ b/lib/CodeGen/CodeGenFunction.cpp @@ -70,18 +70,19 @@ void CodeGenFunction::FinishFunction(SourceLocation EndLoc) { // Finish emission of indirect switches. EmitIndirectSwitches(); - // Emit debug descriptor for function end. - if (CGDebugInfo *DI = CGM.getDebugInfo()) { - DI->setLocation(EndLoc); - DI->EmitRegionEnd(CurFn, Builder); - } - assert(BreakContinueStack.empty() && "mismatched push/pop in break/continue stack!"); // Emit function epilog (to return). This has the nice side effect // of also automatically handling code that falls off the end. EmitBlock(ReturnBlock); + + // Emit debug descriptor for function end. + if (CGDebugInfo *DI = CGM.getDebugInfo()) { + DI->setLocation(EndLoc); + DI->EmitRegionEnd(CurFn, Builder); + } + EmitFunctionEpilog(FnRetTy, ReturnValue); // Remove the AllocaInsertPt instruction, which is just a convenience for us. |