Now that the default for Darwin platforms is to place the LSDA into the TEXT
authorBill Wendling <isanbard@gmail.com>
Mon, 15 Mar 2010 21:09:38 +0000 (21:09 +0000)
committerBill Wendling <isanbard@gmail.com>
Mon, 15 Mar 2010 21:09:38 +0000 (21:09 +0000)
section, remove the target-specific code that performs this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98580 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/TargetLoweringObjectFileImpl.cpp
lib/Target/ARM/ARMISelLowering.cpp
lib/Target/ARM/ARMTargetObjectFile.cpp
lib/Target/ARM/ARMTargetObjectFile.h
lib/Target/PowerPC/CMakeLists.txt
lib/Target/PowerPC/PPCISelLowering.cpp
lib/Target/PowerPC/PPCTargetObjectFile.cpp [deleted file]
lib/Target/PowerPC/PPCTargetObjectFile.h [deleted file]
lib/Target/X86/X86ISelLowering.cpp
lib/Target/X86/X86TargetObjectFile.cpp
lib/Target/X86/X86TargetObjectFile.h

index 9532b2a3d9c0b51c9fbd8ad6a3aede6e0315e4d4..b62cca3073d2e6eeb9da2571aa065a5bfbe005c5 100644 (file)
@@ -560,8 +560,8 @@ void TargetLoweringObjectFileMachO::Initialize(MCContext &Ctx,
   }
 
   // Exception Handling.
-  LSDASection = getMachOSection("__DATA", "__gcc_except_tab", 0,
-                                SectionKind::getDataRel());
+  LSDASection = getMachOSection("__TEXT", "__gcc_except_tab", 0,
+                                SectionKind::getReadOnlyWithRel());
   EHFrameSection =
     getMachOSection("__TEXT", "__eh_frame",
                     MCSectionMachO::S_COALESCED |
@@ -788,7 +788,7 @@ unsigned TargetLoweringObjectFileMachO::getFDEEncoding() const {
 }
 
 unsigned TargetLoweringObjectFileMachO::getTTypeEncoding() const {
-  return DW_EH_PE_absptr;
+  return DW_EH_PE_indirect | DW_EH_PE_pcrel | DW_EH_PE_sdata4;
 }
 
 //===----------------------------------------------------------------------===//
index ac210685c06cb66e9b24868979baffa55159e9a9..5fae975ff74eb64dccff75f46b5a1fc80e464e55 100644 (file)
@@ -130,7 +130,7 @@ void ARMTargetLowering::addQRTypeForNEON(EVT VT) {
 
 static TargetLoweringObjectFile *createTLOF(TargetMachine &TM) {
   if (TM.getSubtarget<ARMSubtarget>().isTargetDarwin())
-    return new ARMMachOTargetObjectFile();
+    return new TargetLoweringObjectFileMachO();
 
   return new ARMElfTargetObjectFile();
 }
index 7463e309a8efe22be9aeeb3848495cae6cceae18..680d03254f10c3c400acf45a3350f143af67ff52 100644 (file)
@@ -10,7 +10,6 @@
 #include "ARMTargetObjectFile.h"
 #include "ARMSubtarget.h"
 #include "llvm/MC/MCSectionELF.h"
-#include "llvm/MC/MCSectionMachO.h"
 #include "llvm/Support/Dwarf.h"
 #include "llvm/Target/TargetMachine.h"
 using namespace llvm;
@@ -35,20 +34,3 @@ void ARMElfTargetObjectFile::Initialize(MCContext &Ctx,
                     SectionKind::getDataRel());
   }
 }
-
-//===----------------------------------------------------------------------===//
-//                              Mach-O Target
-//===----------------------------------------------------------------------===//
-
-void ARMMachOTargetObjectFile::Initialize(MCContext &Ctx,
-                                          const TargetMachine &TM) {
-  TargetLoweringObjectFileMachO::Initialize(Ctx, TM);
-
-  // Exception Handling.
-  LSDASection = getMachOSection("__TEXT", "__gcc_except_tab", 0,
-                                SectionKind::getReadOnlyWithRel());
-}
-
-unsigned ARMMachOTargetObjectFile::getTTypeEncoding() const {
-  return DW_EH_PE_indirect | DW_EH_PE_pcrel | DW_EH_PE_sdata4;
-}
index 481d7abd31073705dad94331cebb29135feaf36b..097fc2cceba35ca46492a0b6e67a7043592c8254 100644 (file)
@@ -24,18 +24,6 @@ public:
   virtual void Initialize(MCContext &Ctx, const TargetMachine &TM);
 };
 
-// FIXME: This subclass isn't 100% necessary. It will become obsolete once we
-//        can place all LSDAs into the TEXT section. See
-//        <rdar://problem/6804645>.
-class ARMMachOTargetObjectFile : public TargetLoweringObjectFileMachO {
-public:
-  ARMMachOTargetObjectFile() : TargetLoweringObjectFileMachO() {}
-
-  virtual void Initialize(MCContext &Ctx, const TargetMachine &TM);
-
-  virtual unsigned getTTypeEncoding() const;
-};
-
 } // end namespace llvm
 
 #endif
index c86b9b9dd1c4f238db6a94d696985e11aeaf11c9..c997c5cfc7a0dce080a81bad0ec014d3d74bb1c9 100644 (file)
@@ -24,7 +24,6 @@ add_llvm_target(PowerPCCodeGen
   PPCRegisterInfo.cpp
   PPCSubtarget.cpp
   PPCTargetMachine.cpp
-  PPCTargetObjectFile.cpp
   )
 
 target_link_libraries (LLVMPowerPCCodeGen LLVMSelectionDAG)
index 344200f78d9953aa9313f5eaceee39d88401c04b..2c072c1290f61f264479daa322a2a3af9ae5108d 100644 (file)
@@ -16,7 +16,6 @@
 #include "PPCPerfectShuffle.h"
 #include "PPCPredicates.h"
 #include "PPCTargetMachine.h"
-#include "PPCTargetObjectFile.h"
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/ADT/VectorExtras.h"
 #include "llvm/CodeGen/CallingConvLower.h"
@@ -60,7 +59,7 @@ cl::desc("enable preincrement load/store generation on PPC (experimental)"),
 
 static TargetLoweringObjectFile *CreateTLOF(const PPCTargetMachine &TM) {
   if (TM.getSubtargetImpl()->isDarwin())
-    return new PPCMachOTargetObjectFile();
+    return new TargetLoweringObjectFileMachO();
 
   return new TargetLoweringObjectFileELF();
 }
diff --git a/lib/Target/PowerPC/PPCTargetObjectFile.cpp b/lib/Target/PowerPC/PPCTargetObjectFile.cpp
deleted file mode 100644 (file)
index de81040..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-//===-- llvm/Target/PPCTargetObjectFile.cpp - PPC Object Info Impl --------===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include "PPCTargetObjectFile.h"
-#include "PPCSubtarget.h"
-#include "llvm/MC/MCSectionMachO.h"
-#include "llvm/Support/Dwarf.h"
-#include "llvm/Target/TargetMachine.h"
-using namespace llvm;
-using namespace dwarf;
-
-//===----------------------------------------------------------------------===//
-//                              Mach-O Target
-//===----------------------------------------------------------------------===//
-
-void PPCMachOTargetObjectFile::Initialize(MCContext &Ctx,
-                                          const TargetMachine &TM) {
-  TargetLoweringObjectFileMachO::Initialize(Ctx, TM);
-
-  // Exception Handling.
-  LSDASection = getMachOSection("__TEXT", "__gcc_except_tab", 0,
-                                SectionKind::getReadOnlyWithRel());
-}
-
-unsigned PPCMachOTargetObjectFile::getTTypeEncoding() const {
-  return DW_EH_PE_indirect | DW_EH_PE_pcrel | DW_EH_PE_sdata4;
-}
diff --git a/lib/Target/PowerPC/PPCTargetObjectFile.h b/lib/Target/PowerPC/PPCTargetObjectFile.h
deleted file mode 100644 (file)
index 2d40bc9..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-//===-- llvm/Target/PPCTargetObjectFile.h - PowerPC Object Info -*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_TARGET_PPC_TARGETOBJECTFILE_H
-#define LLVM_TARGET_PPC_TARGETOBJECTFILE_H
-
-#include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
-
-namespace llvm {
-
-class MCContext;
-class TargetMachine;
-
-// FIXME: This subclass isn't 100% necessary. It will become obsolete once we
-//        can place all LSDAs into the TEXT section. See
-//        <rdar://problem/6804645>.
-class PPCMachOTargetObjectFile : public TargetLoweringObjectFileMachO {
-public:
-  PPCMachOTargetObjectFile() : TargetLoweringObjectFileMachO() {}
-
-  virtual void Initialize(MCContext &Ctx, const TargetMachine &TM);
-
-  virtual unsigned getTTypeEncoding() const;
-};
-
-} // end namespace llvm
-
-#endif
index e810cea17a014fc7c9b4c647a44bf8e95ede1c9a..491c118fe3b06dae66f1c6125ddceed0eca9e366 100644 (file)
@@ -37,7 +37,6 @@
 #include "llvm/CodeGen/PseudoSourceValue.h"
 #include "llvm/MC/MCAsmInfo.h"
 #include "llvm/MC/MCContext.h"
-#include "llvm/MC/MCSectionMachO.h"
 #include "llvm/MC/MCSymbol.h"
 #include "llvm/ADT/BitVector.h"
 #include "llvm/ADT/SmallSet.h"
@@ -74,11 +73,6 @@ static TargetLoweringObjectFile *createTLOF(X86TargetMachine &TM) {
   switch (TM.getSubtarget<X86Subtarget>().TargetType) {
   default: llvm_unreachable("unknown subtarget type");
   case X86Subtarget::isDarwin:
-    if (TM.getSubtarget<X86Subtarget>().is64Bit())
-      return new X8664_MachoTargetObjectFile();
-    else
-      return new X86_MachoTargetObjectFile();
-
     if (TM.getSubtarget<X86Subtarget>().is64Bit())
       return new X8664_MachoTargetObjectFile();
     return new TargetLoweringObjectFileMachO();
index 40f51ac262596b44094e69c1c61823ab8cca2334..f75d41a071682df3edfc6844e4903bc8c1a51bb7 100644 (file)
 using namespace llvm;
 using namespace dwarf;
 
-void X86_MachoTargetObjectFile::Initialize(MCContext &Ctx,
-                                           const TargetMachine &TM) {
-  TargetLoweringObjectFileMachO::Initialize(Ctx, TM);
-
-  // Exception Handling.
-  LSDASection = getMachOSection("__TEXT", "__gcc_except_tab", 0,
-                                SectionKind::getReadOnlyWithRel());
-}
-
-unsigned X86_MachoTargetObjectFile::getTTypeEncoding() const {
-  return DW_EH_PE_indirect | DW_EH_PE_pcrel | DW_EH_PE_sdata4;
-}
-
 const MCExpr *X8664_MachoTargetObjectFile::
 getExprForDwarfGlobalReference(const GlobalValue *GV, Mangler *Mang,
                                MachineModuleInfo *MMI, unsigned Encoding,
index 2ae7631ef57a7249c71d715f042dfc6bacf9125d..f2fd49caca3828160140667e781015613cf9740a 100644 (file)
 namespace llvm {
   class X86TargetMachine;
 
-  /// X86_MachoTargetObjectFile - This TLOF implementation is used for Darwin
-  /// x86 variants.
-  class X86_MachoTargetObjectFile : public TargetLoweringObjectFileMachO {
-  public:
-    virtual void Initialize(MCContext &Ctx, const TargetMachine &TM);
-
-    virtual unsigned getTTypeEncoding() const;
-  };
-
   /// X8664_MachoTargetObjectFile - This TLOF implementation is used for Darwin
   /// x86-64.
-  class X8664_MachoTargetObjectFile : public X86_MachoTargetObjectFile {
+  class X8664_MachoTargetObjectFile : public TargetLoweringObjectFileMachO {
   public:
     virtual const MCExpr *
     getExprForDwarfGlobalReference(const GlobalValue *GV, Mangler *Mang,