diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2012-01-24 00:30:17 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2012-01-24 00:30:17 +0000 |
commit | 3eb4be0ace6263f35a2f3aae9e964a752ebe55af (patch) | |
tree | c2667c6c34a836e960dec7e6660fdc4cdb1e6b5e /lib/Target | |
parent | 7b426cee22a3cac030ec7ace0be04ee8569f18c7 (diff) | |
download | external_llvm-3eb4be0ace6263f35a2f3aae9e964a752ebe55af.zip external_llvm-3eb4be0ace6263f35a2f3aae9e964a752ebe55af.tar.gz external_llvm-3eb4be0ace6263f35a2f3aae9e964a752ebe55af.tar.bz2 |
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
Diffstat (limited to 'lib/Target')
-rw-r--r-- | lib/Target/ARM/ARMAsmPrinter.cpp | 5 | ||||
-rw-r--r-- | lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.cpp | 7 |
2 files changed, 7 insertions, 5 deletions
diff --git a/lib/Target/ARM/ARMAsmPrinter.cpp b/lib/Target/ARM/ARMAsmPrinter.cpp index e0b08f1..288b7f1 100644 --- a/lib/Target/ARM/ARMAsmPrinter.cpp +++ b/lib/Target/ARM/ARMAsmPrinter.cpp @@ -1192,7 +1192,7 @@ void ARMAsmPrinter::EmitUnwindingInstruction(const MachineInstr *MI) { } } -extern cl::opt<ExceptionHandling::ARMEHABIMode> EnableARMEHABI; +extern cl::opt<bool> EnableARMEHABI; // Simple pseudo-instructions have their lowering (with expansion to real // instructions) auto-generated. @@ -1203,8 +1203,7 @@ void ARMAsmPrinter::EmitInstruction(const MachineInstr *MI) { OutStreamer.EmitCodeRegion(); // Emit unwinding stuff for frame-related instructions - if (EnableARMEHABI != ExceptionHandling::ARMEHABIDisabled && - MI->getFlag(MachineInstr::FrameSetup)) + if (EnableARMEHABI && MI->getFlag(MachineInstr::FrameSetup)) EmitUnwindingInstruction(MI); // Do any auto-generated pseudo lowerings. diff --git a/lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.cpp b/lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.cpp index db21def..d1804a2 100644 --- a/lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.cpp +++ b/lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.cpp @@ -16,7 +16,10 @@ using namespace llvm; -extern cl::opt<ExceptionHandling::ARMEHABIMode> EnableARMEHABI; +cl::opt<bool> +EnableARMEHABI("arm-enable-ehabi", cl::Hidden, + cl::desc("Generate ARM EHABI tables"), + cl::init(false)); static const char *const arm_asm_table[] = { @@ -79,6 +82,6 @@ ARMELFMCAsmInfo::ARMELFMCAsmInfo() { SupportsDebugInformation = true; // Exceptions handling - if (EnableARMEHABI != ExceptionHandling::ARMEHABIDisabled) + if (EnableARMEHABI) ExceptionsType = ExceptionHandling::ARM; } |