diff options
author | Chris Lattner <sabre@nondot.org> | 2009-07-31 20:43:26 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-07-31 20:43:26 +0000 |
commit | 740749b470f4e477a68810b749d3dbf089ef19a7 (patch) | |
tree | 4d8a49985aa7d303e305e317e46d4c59b730bb27 /llvm/lib | |
parent | 5ebf64e0757be60c650210b418621f6a44512ed3 (diff) | |
download | bcm5719-llvm-740749b470f4e477a68810b749d3dbf089ef19a7.tar.gz bcm5719-llvm-740749b470f4e477a68810b749d3dbf089ef19a7.zip |
remove the PPCLinuxTargetAsmInfo implementation of PreferredEHDataFormat,
because it just calls the default impl.
Remove the PPCDarwinTargetAsmInfo version of PreferredEHDataFormat because
it just returns DW_EH_PE_absptr unless on 10.6. However, 10.6 doesn't support
PPC, so the default impl is just fine.
llvm-svn: 77724
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp | 31 | ||||
-rw-r--r-- | llvm/lib/Target/PowerPC/PPCTargetAsmInfo.h | 4 |
2 files changed, 0 insertions, 35 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp b/llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp index 68fa73ea5a8..a117df90adc 100644 --- a/llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp +++ b/llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp @@ -34,27 +34,6 @@ PPCDarwinTargetAsmInfo::PPCDarwinTargetAsmInfo(const PPCTargetMachine &TM) : SupportsWeakOmittedEHFrame = false; } -/// PreferredEHDataFormat - This hook allows the target to select data -/// format used for encoding pointers in exception handling data. Reason is -/// 0 for data, 1 for code labels, 2 for function pointers. Global is true -/// if the symbol can be relocated. -unsigned -PPCDarwinTargetAsmInfo::PreferredEHDataFormat(DwarfEncoding::Target Reason, - bool Global) const { - const PPCSubtarget *Subtarget = &TM.getSubtarget<PPCSubtarget>(); - - if (Subtarget->getDarwinVers() > 9) { - if ((Reason == DwarfEncoding::Data || Reason == DwarfEncoding::Functions) - && Global) - return DW_EH_PE_pcrel | DW_EH_PE_indirect | DW_EH_PE_sdata4; - - if (Reason == DwarfEncoding::CodeLabels || !Global) - return DW_EH_PE_pcrel; - } - - return DW_EH_PE_absptr; -} - const char *PPCDarwinTargetAsmInfo::getEHGlobalPrefix() const { const PPCSubtarget* Subtarget = &TM.getSubtarget<PPCSubtarget>(); if (Subtarget->getDarwinVers() > 9) @@ -104,16 +83,6 @@ PPCLinuxTargetAsmInfo::PPCLinuxTargetAsmInfo(const PPCTargetMachine &TM) : DwarfExceptionSection = "\t.section\t.gcc_except_table,\"a\",@progbits"; } -/// PreferredEHDataFormat - This hook allows the target to select data -/// format used for encoding pointers in exception handling data. Reason is -/// 0 for data, 1 for code labels, 2 for function pointers. Global is true -/// if the symbol can be relocated. -unsigned -PPCLinuxTargetAsmInfo::PreferredEHDataFormat(DwarfEncoding::Target Reason, - bool Global) const { - // We really need to write something here. - return TargetAsmInfo::PreferredEHDataFormat(Reason, Global); -} // Instantiate default implementation. TEMPLATE_INSTANTIATION(class PPCTargetAsmInfo<TargetAsmInfo>); diff --git a/llvm/lib/Target/PowerPC/PPCTargetAsmInfo.h b/llvm/lib/Target/PowerPC/PPCTargetAsmInfo.h index edf40c9346c..eb537b9d417 100644 --- a/llvm/lib/Target/PowerPC/PPCTargetAsmInfo.h +++ b/llvm/lib/Target/PowerPC/PPCTargetAsmInfo.h @@ -46,15 +46,11 @@ namespace llvm { struct PPCDarwinTargetAsmInfo : public PPCTargetAsmInfo<DarwinTargetAsmInfo> { explicit PPCDarwinTargetAsmInfo(const PPCTargetMachine &TM); - virtual unsigned PreferredEHDataFormat(DwarfEncoding::Target Reason, - bool Global) const; virtual const char *getEHGlobalPrefix() const; }; struct PPCLinuxTargetAsmInfo : public PPCTargetAsmInfo<ELFTargetAsmInfo> { explicit PPCLinuxTargetAsmInfo(const PPCTargetMachine &TM); - virtual unsigned PreferredEHDataFormat(DwarfEncoding::Target Reason, - bool Global) const; }; } // namespace llvm |