[llvm-commits] [llvm] r77724 - in /llvm/trunk/lib/Target/PowerPC: PPCTargetAsmInfo.cpp PPCTargetAsmInfo.h

Chris Lattner sabre at nondot.org
Fri Jul 31 13:43:26 PDT 2009


Author: lattner
Date: Fri Jul 31 15:43:26 2009
New Revision: 77724

URL: http://llvm.org/viewvc/llvm-project?rev=77724&view=rev
Log:
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.

Modified:
    llvm/trunk/lib/Target/PowerPC/PPCTargetAsmInfo.cpp
    llvm/trunk/lib/Target/PowerPC/PPCTargetAsmInfo.h

Modified: llvm/trunk/lib/Target/PowerPC/PPCTargetAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCTargetAsmInfo.cpp?rev=77724&r1=77723&r2=77724&view=diff

==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCTargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCTargetAsmInfo.cpp Fri Jul 31 15:43:26 2009
@@ -34,27 +34,6 @@
   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 @@
   DwarfExceptionSection = "\t.section\t.gcc_except_table,\"a\", at 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>);

Modified: llvm/trunk/lib/Target/PowerPC/PPCTargetAsmInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCTargetAsmInfo.h?rev=77724&r1=77723&r2=77724&view=diff

==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCTargetAsmInfo.h (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCTargetAsmInfo.h Fri Jul 31 15:43:26 2009
@@ -46,15 +46,11 @@
 
   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





More information about the llvm-commits mailing list