diff options
| author | Chris Lattner <sabre@nondot.org> | 2009-08-02 04:02:52 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2009-08-02 04:02:52 +0000 |
| commit | 29c6c43cd02caa204a03f71668abd00a33bde43e (patch) | |
| tree | ee86295a439e49784a89eb55bd5cd545a50e683a /llvm/lib | |
| parent | 7005cd3fa075371778e1528453b0a3fbe63d5d50 (diff) | |
| download | bcm5719-llvm-29c6c43cd02caa204a03f71668abd00a33bde43e.tar.gz bcm5719-llvm-29c6c43cd02caa204a03f71668abd00a33bde43e.zip | |
remove the dead PreferredEHDataFormat TAI hook: its now dead
even considering #if 0 code.
llvm-svn: 77856
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/TargetAsmInfo.cpp | 4 | ||||
| -rw-r--r-- | llvm/lib/Target/X86/X86TargetAsmInfo.cpp | 72 | ||||
| -rw-r--r-- | llvm/lib/Target/X86/X86TargetAsmInfo.h | 9 |
3 files changed, 1 insertions, 84 deletions
diff --git a/llvm/lib/Target/TargetAsmInfo.cpp b/llvm/lib/Target/TargetAsmInfo.cpp index e961f2ad74f..cb835e630f0 100644 --- a/llvm/lib/Target/TargetAsmInfo.cpp +++ b/llvm/lib/Target/TargetAsmInfo.cpp @@ -140,10 +140,6 @@ unsigned TargetAsmInfo::getInlineAsmLength(const char *Str) const { return Length; } -unsigned TargetAsmInfo::PreferredEHDataFormat() const { - return dwarf::DW_EH_PE_absptr; -} - unsigned TargetAsmInfo::getULEB128Size(unsigned Value) { unsigned Size = 0; do { diff --git a/llvm/lib/Target/X86/X86TargetAsmInfo.cpp b/llvm/lib/Target/X86/X86TargetAsmInfo.cpp index 4c9030845a0..db9cf905c4f 100644 --- a/llvm/lib/Target/X86/X86TargetAsmInfo.cpp +++ b/llvm/lib/Target/X86/X86TargetAsmInfo.cpp @@ -86,14 +86,6 @@ X86DarwinTargetAsmInfo::X86DarwinTargetAsmInfo(const X86TargetMachine &TM): ".section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support"; } -unsigned X86DarwinTargetAsmInfo::PreferredEHDataFormat() const { - const X86Subtarget *Subtarget = &TM.getSubtarget<X86Subtarget>(); - if (Subtarget->getDarwinVers() > 9) - return DW_EH_PE_pcrel | DW_EH_PE_indirect | DW_EH_PE_sdata4; - - return DW_EH_PE_absptr; -} - const char * X86DarwinTargetAsmInfo::getEHGlobalPrefix() const { const X86Subtarget* Subtarget = &TM.getSubtarget<X86Subtarget>(); @@ -138,70 +130,6 @@ X86ELFTargetAsmInfo::X86ELFTargetAsmInfo(const X86TargetMachine &TM) : NonexecutableStackDirective = "\t.section\t.note.GNU-stack,\"\",@progbits"; } -unsigned -X86ELFTargetAsmInfo::PreferredEHDataFormat() const { - CodeModel::Model CM = TM.getCodeModel(); - bool is64Bit = TM.getSubtarget<X86Subtarget>().is64Bit(); - - if (TM.getRelocationModel() == Reloc::PIC_) { - unsigned Format = 0; - - if (!is64Bit) - // 32 bit targets always encode pointers as 4 bytes - Format = DW_EH_PE_sdata4; - else { - // 64 bit targets encode pointers in 4 bytes iff: - // - code model is small OR - // - code model is medium and we're emitting externally visible symbols - // or any code symbols - if (CM == CodeModel::Small || CM == CodeModel::Medium) - Format = DW_EH_PE_sdata4; - else - Format = DW_EH_PE_sdata8; - } - - Format |= DW_EH_PE_indirect; - return (Format | DW_EH_PE_pcrel); - } - - if (is64Bit && CM == CodeModel::Small) - return DW_EH_PE_udata4; - return DW_EH_PE_absptr; -} - - -unsigned -X86COFFTargetAsmInfo::PreferredEHDataFormat() const { - CodeModel::Model CM = TM.getCodeModel(); - bool is64Bit = TM.getSubtarget<X86Subtarget>().is64Bit(); - - if (TM.getRelocationModel() == Reloc::PIC_) { - unsigned Format = 0; - - if (!is64Bit) - // 32 bit targets always encode pointers as 4 bytes - Format = DW_EH_PE_sdata4; - else { - // 64 bit targets encode pointers in 4 bytes iff: - // - code model is small OR - // - code model is medium and we're emitting externally visible symbols - // or any code symbols - if (CM == CodeModel::Small || CM == CodeModel::Medium) - Format = DW_EH_PE_sdata4; - else - Format = DW_EH_PE_sdata8; - } - - Format |= DW_EH_PE_indirect; - return (Format | DW_EH_PE_pcrel); - } - - if (is64Bit && CM == CodeModel::Small) - return DW_EH_PE_udata4; - return DW_EH_PE_absptr; -} - - X86WinTargetAsmInfo::X86WinTargetAsmInfo(const X86TargetMachine &TM): X86TargetAsmInfo<TargetAsmInfo>(TM) { diff --git a/llvm/lib/Target/X86/X86TargetAsmInfo.h b/llvm/lib/Target/X86/X86TargetAsmInfo.h index 3cc027185c9..f7113b3e5ed 100644 --- a/llvm/lib/Target/X86/X86TargetAsmInfo.h +++ b/llvm/lib/Target/X86/X86TargetAsmInfo.h @@ -37,21 +37,14 @@ namespace llvm { struct X86DarwinTargetAsmInfo : public X86TargetAsmInfo<DarwinTargetAsmInfo> { explicit X86DarwinTargetAsmInfo(const X86TargetMachine &TM); - virtual unsigned PreferredEHDataFormat() const; virtual const char *getEHGlobalPrefix() const; }; struct X86ELFTargetAsmInfo : public X86TargetAsmInfo<ELFTargetAsmInfo> { explicit X86ELFTargetAsmInfo(const X86TargetMachine &TM); - virtual unsigned PreferredEHDataFormat() const; }; - struct X86COFFTargetAsmInfo : public X86TargetAsmInfo<COFFTargetAsmInfo> { - explicit X86COFFTargetAsmInfo(const X86TargetMachine &TM) : - X86TargetAsmInfo<COFFTargetAsmInfo>(TM) {} - virtual unsigned PreferredEHDataFormat() const; - }; - + typedef X86TargetAsmInfo<COFFTargetAsmInfo> X86COFFTargetAsmInfo; struct X86WinTargetAsmInfo : public X86TargetAsmInfo<TargetAsmInfo> { explicit X86WinTargetAsmInfo(const X86TargetMachine &TM); |

