summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86ISelLowering.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2010-03-15 19:04:37 +0000
committerBill Wendling <isanbard@gmail.com>2010-03-15 19:04:37 +0000
commit0344874921e292cae4bd8b788eed1d782280f142 (patch)
tree876c4461a26868f03fba0c085edf48bf6c5a63e6 /llvm/lib/Target/X86/X86ISelLowering.cpp
parentae5edee6c88eb96ab31f813aac1ea749bc81134f (diff)
downloadbcm5719-llvm-0344874921e292cae4bd8b788eed1d782280f142.tar.gz
bcm5719-llvm-0344874921e292cae4bd8b788eed1d782280f142.zip
Place the LSDA into the TEXT section for x86 Darwin. If the global it's pointing
to is local to the translation unit, we need to place fill the value of that symbol into the non-lazy pointer. This should conclude all Darwin changes for placing the LSDA into the TEXT section. There is some cleanup to do. I.e., there's no longer a special need for target-specific code here. But that can come later. llvm-svn: 98564
Diffstat (limited to 'llvm/lib/Target/X86/X86ISelLowering.cpp')
-rw-r--r--llvm/lib/Target/X86/X86ISelLowering.cpp47
1 files changed, 4 insertions, 43 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index 06642a9a77c..e810cea17a0 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -70,53 +70,14 @@ Disable16Bit("disable-16bit", cl::Hidden,
static SDValue getMOVL(SelectionDAG &DAG, DebugLoc dl, EVT VT, SDValue V1,
SDValue V2);
-// FIXME: This is for a test.
-static cl::opt<bool>
-EnableX86EHTest("enable-x86-eh-test", cl::Hidden);
-
-namespace llvm {
- class X86_test_MachoTargetObjectFile : public TargetLoweringObjectFileMachO {
- public:
- virtual void Initialize(MCContext &Ctx, const TargetMachine &TM) {
- TargetLoweringObjectFileMachO::Initialize(Ctx, TM);
-
- // Exception Handling.
- LSDASection = getMachOSection("__TEXT", "__gcc_except_tab", 0,
- SectionKind::getReadOnlyWithRel());
- }
-
- virtual unsigned getTTypeEncoding() const {
- return DW_EH_PE_indirect | DW_EH_PE_pcrel | DW_EH_PE_sdata4;
- }
- };
-
- class X8664_test_MachoTargetObjectFile : public X8664_MachoTargetObjectFile {
- public:
- virtual void Initialize(MCContext &Ctx, const TargetMachine &TM) {
- TargetLoweringObjectFileMachO::Initialize(Ctx, TM);
-
- // Exception Handling.
- LSDASection = getMachOSection("__TEXT", "__gcc_except_tab", 0,
- SectionKind::getReadOnlyWithRel());
- }
-
- virtual unsigned getTTypeEncoding() const {
- return DW_EH_PE_indirect | DW_EH_PE_pcrel | DW_EH_PE_sdata4;
- }
- };
-}
-
static TargetLoweringObjectFile *createTLOF(X86TargetMachine &TM) {
switch (TM.getSubtarget<X86Subtarget>().TargetType) {
default: llvm_unreachable("unknown subtarget type");
case X86Subtarget::isDarwin:
- // FIXME: This is for an EH test.
- if (EnableX86EHTest) {
- if (TM.getSubtarget<X86Subtarget>().is64Bit())
- return new X8664_test_MachoTargetObjectFile();
- else
- return new X86_test_MachoTargetObjectFile();
- }
+ if (TM.getSubtarget<X86Subtarget>().is64Bit())
+ return new X8664_MachoTargetObjectFile();
+ else
+ return new X86_MachoTargetObjectFile();
if (TM.getSubtarget<X86Subtarget>().is64Bit())
return new X8664_MachoTargetObjectFile();
OpenPOWER on IntegriCloud