From 3c10817b927ad9aa1e48bc85f29e47bfc4736b0e Mon Sep 17 00:00:00 2001 From: Joerg Sonnenberger Date: Wed, 30 Apr 2014 22:43:13 +0000 Subject: Prepare support of Itanium ABI on ARM as opposed to EHABI by conditionally emitting .fnstart and friends only for EHABI. llvm-svn: 207718 --- llvm/lib/CodeGen/AsmPrinter/ARMException.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'llvm/lib/CodeGen') diff --git a/llvm/lib/CodeGen/AsmPrinter/ARMException.cpp b/llvm/lib/CodeGen/AsmPrinter/ARMException.cpp index 1a8173cd175..97b288f1947 100644 --- a/llvm/lib/CodeGen/AsmPrinter/ARMException.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/ARMException.cpp @@ -57,7 +57,8 @@ void ARMException::endModule() { /// beginFunction - Gather pre-function exception information. Assumes it's /// being emitted immediately after the function entry point. void ARMException::beginFunction(const MachineFunction *MF) { - getTargetStreamer().emitFnStart(); + if (Asm->MAI->getExceptionHandlingType() == ExceptionHandling::ARM) + getTargetStreamer().emitFnStart(); if (Asm->MF->getFunction()->needsUnwindTableEntry()) Asm->OutStreamer.EmitLabel(Asm->GetTempSymbol("eh_func_begin", Asm->getFunctionNumber())); @@ -104,7 +105,8 @@ void ARMException::endFunction(const MachineFunction *) { } } - ATS.emitFnEnd(); + if (Asm->MAI->getExceptionHandlingType() == ExceptionHandling::ARM) + ATS.emitFnEnd(); } void ARMException::EmitTypeInfos(unsigned TTypeEncoding) { -- cgit v1.2.3