summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp9
-rw-r--r--llvm/test/CodeGen/ARM/2009-08-31-LSDA-Name.ll8
-rw-r--r--llvm/test/DebugInfo/ARM/prologue_end.ll1
3 files changed, 10 insertions, 8 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp
index 5cc063e6c95..2eae1b23447 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp
@@ -66,13 +66,13 @@ DwarfCFIException::~DwarfCFIException() {}
/// endModule - Emit all exception information that should come after the
/// content.
void DwarfCFIException::endModule() {
- if (moveTypeModule == AsmPrinter::CFI_M_Debug)
- Asm->OutStreamer->EmitCFISections(false, true);
-
// SjLj uses this pass and it doesn't need this info.
if (!Asm->MAI->usesCFIForEH())
return;
+ if (moveTypeModule == AsmPrinter::CFI_M_Debug)
+ Asm->OutStreamer->EmitCFISections(false, true);
+
const TargetLoweringObjectFile &TLOF = Asm->getObjFileLowering();
unsigned PerEncoding = TLOF.getPersonalityEncoding();
@@ -133,7 +133,8 @@ void DwarfCFIException::beginFunction(const MachineFunction *MF) {
shouldEmitLSDA = shouldEmitPersonality &&
LSDAEncoding != dwarf::DW_EH_PE_omit;
- shouldEmitCFI = shouldEmitPersonality || shouldEmitMoves;
+ shouldEmitCFI = MF->getMMI().getContext().getAsmInfo()->usesCFIForEH() &&
+ (shouldEmitPersonality || shouldEmitMoves);
beginFragment(&*MF->begin(), getExceptionSym);
}
diff --git a/llvm/test/CodeGen/ARM/2009-08-31-LSDA-Name.ll b/llvm/test/CodeGen/ARM/2009-08-31-LSDA-Name.ll
index d402c16ccac..0a9fd895574 100644
--- a/llvm/test/CodeGen/ARM/2009-08-31-LSDA-Name.ll
+++ b/llvm/test/CodeGen/ARM/2009-08-31-LSDA-Name.ll
@@ -1,8 +1,10 @@
; RUN: llc < %s -mtriple=arm-apple-darwin9 -march=arm | FileCheck %s
-; CHECK: .cfi_lsda 16, [[LABEL:.*]]
-; CHECK: .long [[LABEL]]-
-; CHECK: [[LABEL]]:
+; CHECK: ldr r0, [[CPI_PERSONALITY:[A-Za-z0-9_]+]]
+; CHECK: ldr r0, [[CPI_LSDA:[A-Za-z0-9_]+]]
+; CHECK: [[CPI_LSDA]]:
+; CHECK: .long [[LSDA_LABEL:[A-Za-z0-9_]+]]-
+; CHECK: [[LSDA_LABEL]]:
; CHECK: .byte 255 @ @LPStart Encoding = omit
%struct.A = type { i32* }
diff --git a/llvm/test/DebugInfo/ARM/prologue_end.ll b/llvm/test/DebugInfo/ARM/prologue_end.ll
index 533d1c82554..43e3c51ecc7 100644
--- a/llvm/test/DebugInfo/ARM/prologue_end.ll
+++ b/llvm/test/DebugInfo/ARM/prologue_end.ll
@@ -9,7 +9,6 @@
define void @prologue_end_test() nounwind uwtable !dbg !4 {
; CHECK: prologue_end_test:
- ; CHECK: .cfi_startproc
; CHECK: push {r7, lr}
; CHECK: {{mov r7, sp|add r7, sp}}
; CHECK: sub sp
OpenPOWER on IntegriCloud