summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2008-11-11 20:59:54 +0000
committerDaniel Dunbar <daniel@zuster.org>2008-11-11 20:59:54 +0000
commitfab3f936ddcc4916c365e989be3679b9bb96ea4f (patch)
tree181721813c40aa05bafc4579a3bbaca8b1ccb96b /clang/lib/CodeGen/CodeGenFunction.cpp
parentfdf389b9e41c6b1ff2b24fd56e5c253a8703092b (diff)
downloadbcm5719-llvm-fab3f936ddcc4916c365e989be3679b9bb96ea4f.tar.gz
bcm5719-llvm-fab3f936ddcc4916c365e989be3679b9bb96ea4f.zip
Emit debug region end in unified return block.
llvm-svn: 59081
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp
index 1a26610d752..bcd1e09800e 100644
--- a/clang/lib/CodeGen/CodeGenFunction.cpp
+++ b/clang/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.
OpenPOWER on IntegriCloud