aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/AsmPrinter/DwarfException.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2009-09-09 21:08:12 +0000
committerBill Wendling <isanbard@gmail.com>2009-09-09 21:08:12 +0000
commit7b09a6c62215e5ed30443b0d2b2a5ae18b89b94f (patch)
tree92b0adf9df5d7beb6aca0af0d5658601d06b271d /lib/CodeGen/AsmPrinter/DwarfException.cpp
parentb4049fe8cbb38416522f7b214f028ef0b7693d21 (diff)
Early exit from function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81381 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfException.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfException.cpp27
1 files changed, 13 insertions, 14 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfException.cpp b/lib/CodeGen/AsmPrinter/DwarfException.cpp
index 3e82b0fc86..bd49724ef6 100644
--- a/lib/CodeGen/AsmPrinter/DwarfException.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfException.cpp
@@ -906,23 +906,22 @@ void DwarfException::BeginFunction(MachineFunction *MF) {
/// EndFunction - Gather and emit post-function exception information.
///
void DwarfException::EndFunction() {
+ if (!shouldEmitMoves && !shouldEmitTable) return;
+
if (TimePassesIsEnabled)
ExceptionTimer->startTimer();
- if (shouldEmitMoves || shouldEmitTable) {
- EmitLabel("eh_func_end", SubprogramCount);
- EmitExceptionTable();
-
- // Save EH frame information
- EHFrames.push_back(
- FunctionEHFrameInfo(getAsm()->getCurrentFunctionEHName(MF),
- SubprogramCount,
- MMI->getPersonalityIndex(),
- MF->getFrameInfo()->hasCalls(),
- !MMI->getLandingPads().empty(),
- MMI->getFrameMoves(),
- MF->getFunction()));
- }
+ EmitLabel("eh_func_end", SubprogramCount);
+ EmitExceptionTable();
+
+ // Save EH frame information
+ EHFrames.push_back(FunctionEHFrameInfo(getAsm()->getCurrentFunctionEHName(MF),
+ SubprogramCount,
+ MMI->getPersonalityIndex(),
+ MF->getFrameInfo()->hasCalls(),
+ !MMI->getLandingPads().empty(),
+ MMI->getFrameMoves(),
+ MF->getFunction()));
if (TimePassesIsEnabled)
ExceptionTimer->stopTimer();