From 3eb4be0ace6263f35a2f3aae9e964a752ebe55af Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Tue, 24 Jan 2012 00:30:17 +0000 Subject: Revert r148686 (and r148694, a fix to it) due to a serious layering violation -- MC cannot depend on CodeGen. Specifically, the MCTargetDesc component of each target is actually a subcomponent of the MC library. As such, it cannot depend on the target-independent code generator, because MC itself cannot depend on the target-independent code generator. This change moved a flag from the ARM MCTargetDesc file ARMMCAsmInfo.cpp to the CodeGen layer in ARMException.cpp, leaving behind an 'extern' to refer back to it. That layering order isn't viable givin the constraints outlined above. Commandline flags are designed to be static specifically to avoid these types of bugs. Fixing this is likely going to require some non-trivial refactoring. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148759 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/AsmPrinter/ARMException.cpp | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) (limited to 'lib/CodeGen/AsmPrinter/ARMException.cpp') diff --git a/lib/CodeGen/AsmPrinter/ARMException.cpp b/lib/CodeGen/AsmPrinter/ARMException.cpp index e5a7d05f4c..3f23873253 100644 --- a/lib/CodeGen/AsmPrinter/ARMException.cpp +++ b/lib/CodeGen/AsmPrinter/ARMException.cpp @@ -29,7 +29,6 @@ #include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetOptions.h" #include "llvm/Target/TargetRegisterInfo.h" -#include "llvm/Support/CommandLine.h" #include "llvm/Support/Dwarf.h" #include "llvm/Support/FormattedStream.h" #include "llvm/ADT/SmallString.h" @@ -37,18 +36,6 @@ #include "llvm/ADT/Twine.h" using namespace llvm; -cl::opt -EnableARMEHABI("arm-enable-ehabi", cl::Hidden, - cl::desc("Generate ARM EHABI tables:"), - cl::values(clEnumValN(ExceptionHandling::ARMEHABIDisabled, "no", - "Do not generate ARM EHABI tables"), - clEnumValN(ExceptionHandling::ARMEHABIUnwind, "unwind", - "Emit unwinding instructions, but not descriptors"), - clEnumValN(ExceptionHandling::ARMEHABIFull, "full", - "Generate full ARM EHABI tables"), - clEnumValEnd)); - - ARMException::ARMException(AsmPrinter *A) : DwarfException(A), shouldEmitTable(false), shouldEmitMoves(false), shouldEmitTableModule(false) @@ -85,15 +72,13 @@ void ARMException::EndFunction() { Asm->OutStreamer.EmitPersonality(PerSym); } - if (EnableARMEHABI == ExceptionHandling::ARMEHABIFull) { - // Map all labels and get rid of any dead landing pads. - MMI->TidyLandingPads(); + // Map all labels and get rid of any dead landing pads. + MMI->TidyLandingPads(); - Asm->OutStreamer.EmitHandlerData(); + Asm->OutStreamer.EmitHandlerData(); - // Emit actual exception table - EmitExceptionTable(); - } + // Emit actual exception table + EmitExceptionTable(); } Asm->OutStreamer.EmitFnEnd(); -- cgit v1.2.3-18-g5258