llvm.org GIT mirror llvm / 505ad8b
Now that the default for Darwin platforms is to place the LSDA into the TEXT 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 Bill Wendling 10 years ago
11 changed file(s) with 6 addition(s) and 133 deletion(s). Raw diff Collapse all Expand all
559559 }
560560
561561 // Exception Handling.
562 LSDASection = getMachOSection("__DATA", "__gcc_except_tab", 0,
563 SectionKind::getDataRel());
562 LSDASection = getMachOSection("__TEXT", "__gcc_except_tab", 0,
563 SectionKind::getReadOnlyWithRel());
564564 EHFrameSection =
565565 getMachOSection("__TEXT", "__eh_frame",
566566 MCSectionMachO::S_COALESCED |
787787 }
788788
789789 unsigned TargetLoweringObjectFileMachO::getTTypeEncoding() const {
790 return DW_EH_PE_absptr;
790 return DW_EH_PE_indirect | DW_EH_PE_pcrel | DW_EH_PE_sdata4;
791791 }
792792
793793 //===----------------------------------------------------------------------===//
129129
130130 static TargetLoweringObjectFile *createTLOF(TargetMachine &TM) {
131131 if (TM.getSubtarget().isTargetDarwin())
132 return new ARMMachOTargetObjectFile();
132 return new TargetLoweringObjectFileMachO();
133133
134134 return new ARMElfTargetObjectFile();
135135 }
99 #include "ARMTargetObjectFile.h"
1010 #include "ARMSubtarget.h"
1111 #include "llvm/MC/MCSectionELF.h"
12 #include "llvm/MC/MCSectionMachO.h"
1312 #include "llvm/Support/Dwarf.h"
1413 #include "llvm/Target/TargetMachine.h"
1514 using namespace llvm;
3433 SectionKind::getDataRel());
3534 }
3635 }
37
38 //===----------------------------------------------------------------------===//
39 // Mach-O Target
40 //===----------------------------------------------------------------------===//
41
42 void ARMMachOTargetObjectFile::Initialize(MCContext &Ctx,
43 const TargetMachine &TM) {
44 TargetLoweringObjectFileMachO::Initialize(Ctx, TM);
45
46 // Exception Handling.
47 LSDASection = getMachOSection("__TEXT", "__gcc_except_tab", 0,
48 SectionKind::getReadOnlyWithRel());
49 }
50
51 unsigned ARMMachOTargetObjectFile::getTTypeEncoding() const {
52 return DW_EH_PE_indirect | DW_EH_PE_pcrel | DW_EH_PE_sdata4;
53 }
2323 virtual void Initialize(MCContext &Ctx, const TargetMachine &TM);
2424 };
2525
26 // FIXME: This subclass isn't 100% necessary. It will become obsolete once we
27 // can place all LSDAs into the TEXT section. See
28 // .
29 class ARMMachOTargetObjectFile : public TargetLoweringObjectFileMachO {
30 public:
31 ARMMachOTargetObjectFile() : TargetLoweringObjectFileMachO() {}
32
33 virtual void Initialize(MCContext &Ctx, const TargetMachine &TM);
34
35 virtual unsigned getTTypeEncoding() const;
36 };
37
3826 } // end namespace llvm
3927
4028 #endif
2323 PPCRegisterInfo.cpp
2424 PPCSubtarget.cpp
2525 PPCTargetMachine.cpp
26 PPCTargetObjectFile.cpp
2726 )
2827
2928 target_link_libraries (LLVMPowerPCCodeGen LLVMSelectionDAG)
1515 #include "PPCPerfectShuffle.h"
1616 #include "PPCPredicates.h"
1717 #include "PPCTargetMachine.h"
18 #include "PPCTargetObjectFile.h"
1918 #include "llvm/ADT/STLExtras.h"
2019 #include "llvm/ADT/VectorExtras.h"
2120 #include "llvm/CodeGen/CallingConvLower.h"
5958
6059 static TargetLoweringObjectFile *CreateTLOF(const PPCTargetMachine &TM) {
6160 if (TM.getSubtargetImpl()->isDarwin())
62 return new PPCMachOTargetObjectFile();
61 return new TargetLoweringObjectFileMachO();
6362
6463 return new TargetLoweringObjectFileELF();
6564 }
+0
-33
lib/Target/PowerPC/PPCTargetObjectFile.cpp less more
None //===-- llvm/Target/PPCTargetObjectFile.cpp - PPC Object Info Impl --------===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8
9 #include "PPCTargetObjectFile.h"
10 #include "PPCSubtarget.h"
11 #include "llvm/MC/MCSectionMachO.h"
12 #include "llvm/Support/Dwarf.h"
13 #include "llvm/Target/TargetMachine.h"
14 using namespace llvm;
15 using namespace dwarf;
16
17 //===----------------------------------------------------------------------===//
18 // Mach-O Target
19 //===----------------------------------------------------------------------===//
20
21 void PPCMachOTargetObjectFile::Initialize(MCContext &Ctx,
22 const TargetMachine &TM) {
23 TargetLoweringObjectFileMachO::Initialize(Ctx, TM);
24
25 // Exception Handling.
26 LSDASection = getMachOSection("__TEXT", "__gcc_except_tab", 0,
27 SectionKind::getReadOnlyWithRel());
28 }
29
30 unsigned PPCMachOTargetObjectFile::getTTypeEncoding() const {
31 return DW_EH_PE_indirect | DW_EH_PE_pcrel | DW_EH_PE_sdata4;
32 }
+0
-34
lib/Target/PowerPC/PPCTargetObjectFile.h less more
None //===-- llvm/Target/PPCTargetObjectFile.h - PowerPC Object Info -*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8
9 #ifndef LLVM_TARGET_PPC_TARGETOBJECTFILE_H
10 #define LLVM_TARGET_PPC_TARGETOBJECTFILE_H
11
12 #include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
13
14 namespace llvm {
15
16 class MCContext;
17 class TargetMachine;
18
19 // FIXME: This subclass isn't 100% necessary. It will become obsolete once we
20 // can place all LSDAs into the TEXT section. See
21 // .
22 class PPCMachOTargetObjectFile : public TargetLoweringObjectFileMachO {
23 public:
24 PPCMachOTargetObjectFile() : TargetLoweringObjectFileMachO() {}
25
26 virtual void Initialize(MCContext &Ctx, const TargetMachine &TM);
27
28 virtual unsigned getTTypeEncoding() const;
29 };
30
31 } // end namespace llvm
32
33 #endif
3636 #include "llvm/CodeGen/PseudoSourceValue.h"
3737 #include "llvm/MC/MCAsmInfo.h"
3838 #include "llvm/MC/MCContext.h"
39 #include "llvm/MC/MCSectionMachO.h"
4039 #include "llvm/MC/MCSymbol.h"
4140 #include "llvm/ADT/BitVector.h"
4241 #include "llvm/ADT/SmallSet.h"
7372 switch (TM.getSubtarget().TargetType) {
7473 default: llvm_unreachable("unknown subtarget type");
7574 case X86Subtarget::isDarwin:
76 if (TM.getSubtarget().is64Bit())
77 return new X8664_MachoTargetObjectFile();
78 else
79 return new X86_MachoTargetObjectFile();
80
8175 if (TM.getSubtarget().is64Bit())
8276 return new X8664_MachoTargetObjectFile();
8377 return new TargetLoweringObjectFileMachO();
1717 #include "llvm/Support/Dwarf.h"
1818 using namespace llvm;
1919 using namespace dwarf;
20
21 void X86_MachoTargetObjectFile::Initialize(MCContext &Ctx,
22 const TargetMachine &TM) {
23 TargetLoweringObjectFileMachO::Initialize(Ctx, TM);
24
25 // Exception Handling.
26 LSDASection = getMachOSection("__TEXT", "__gcc_except_tab", 0,
27 SectionKind::getReadOnlyWithRel());
28 }
29
30 unsigned X86_MachoTargetObjectFile::getTTypeEncoding() const {
31 return DW_EH_PE_indirect | DW_EH_PE_pcrel | DW_EH_PE_sdata4;
32 }
3320
3421 const MCExpr *X8664_MachoTargetObjectFile::
3522 getExprForDwarfGlobalReference(const GlobalValue *GV, Mangler *Mang,
1616 namespace llvm {
1717 class X86TargetMachine;
1818
19 /// X86_MachoTargetObjectFile - This TLOF implementation is used for Darwin
20 /// x86 variants.
21 class X86_MachoTargetObjectFile : public TargetLoweringObjectFileMachO {
22 public:
23 virtual void Initialize(MCContext &Ctx, const TargetMachine &TM);
24
25 virtual unsigned getTTypeEncoding() const;
26 };
27
2819 /// X8664_MachoTargetObjectFile - This TLOF implementation is used for Darwin
2920 /// x86-64.
30 class X8664_MachoTargetObjectFile : public X86_MachoTargetObjectFile {
21 class X8664_MachoTargetObjectFile : public TargetLoweringObjectFileMachO {
3122 public:
3223 virtual const MCExpr *
3324 getExprForDwarfGlobalReference(const GlobalValue *GV, Mangler *Mang,