[llvm-branch-commits] [llvm-branch] r89380 - in /llvm/branches/Apple/Leela/lib: CodeGen/AsmPrinter/DwarfException.cpp Target/TargetLoweringObjectFile.cpp

Bill Wendling isanbard at gmail.com
Thu Nov 19 11:22:24 PST 2009


Author: void
Date: Thu Nov 19 13:22:24 2009
New Revision: 89380

URL: http://llvm.org/viewvc/llvm-project?rev=89380&view=rev
Log:
Reverting EH table patch.

$ svn merge -c -89279 https://llvm.org/svn/llvm-project/llvm/trunk
--- Reverse-merging r89279 into '.':
U    lib/CodeGen/AsmPrinter/DwarfException.cpp
U    lib/Target/TargetLoweringObjectFile.cpp
$ svn merge -c -89270 https://llvm.org/svn/llvm-project/llvm/trunk
--- Reverse-merging r89270 into '.':
G    lib/CodeGen/AsmPrinter/DwarfException.cpp
G    lib/Target/TargetLoweringObjectFile.cpp


Modified:
    llvm/branches/Apple/Leela/lib/CodeGen/AsmPrinter/DwarfException.cpp
    llvm/branches/Apple/Leela/lib/Target/TargetLoweringObjectFile.cpp

Modified: llvm/branches/Apple/Leela/lib/CodeGen/AsmPrinter/DwarfException.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Leela/lib/CodeGen/AsmPrinter/DwarfException.cpp?rev=89380&r1=89379&r2=89380&view=diff

==============================================================================
--- llvm/branches/Apple/Leela/lib/CodeGen/AsmPrinter/DwarfException.cpp (original)
+++ llvm/branches/Apple/Leela/lib/CodeGen/AsmPrinter/DwarfException.cpp Thu Nov 19 13:22:24 2009
@@ -707,8 +707,7 @@
     // somewhere.  This predicate should be moved to a shared location that is
     // in target-independent code.
     //
-    if ((LSDASection->getKind().isWriteable() &&
-         !LSDASection->getKind().isReadOnlyWithRel()) ||
+    if (LSDASection->getKind().isWriteable() ||
         Asm->TM.getRelocationModel() == Reloc::Static)
       TTypeFormat = dwarf::DW_EH_PE_absptr;
     else
@@ -898,36 +897,14 @@
   }
 
   // Emit the Catch TypeInfos.
-  const TargetLoweringObjectFile &TLOF = Asm->getObjFileLowering();
-  unsigned Index = 1;
-
   for (std::vector<GlobalVariable *>::const_reverse_iterator
          I = TypeInfos.rbegin(), E = TypeInfos.rend(); I != E; ++I) {
-    const GlobalVariable *TI = *I;
-
-    if (TI) {
-      if (!LSDASection->getKind().isReadOnlyWithRel() &&
-          (TTypeFormat == dwarf::DW_EH_PE_absptr ||
-           TI->getLinkage() == GlobalValue::InternalLinkage)) {
-        // Print out the unadorned name of the type info.
-        PrintRelDirective();
-        O << Asm->Mang->getMangledName(TI);
-      } else {
-        bool IsTypeInfoIndirect = false, IsTypeInfoPCRel = false;
-        const MCExpr *TypeInfoRef =
-          TLOF.getSymbolForDwarfGlobalReference(TI, Asm->Mang, Asm->MMI,
-                                                IsTypeInfoIndirect,
-                                                IsTypeInfoPCRel);
-
-        if (!IsTypeInfoPCRel)
-          TypeInfoRef = CreateLabelDiff(TypeInfoRef, "typeinforef_addr",
-                                        Index++);
+    const GlobalVariable *GV = *I;
+    PrintRelDirective();
 
-        O << MAI->getData32bitsDirective();
-        TypeInfoRef->print(O, MAI);
-      }
+    if (GV) {
+      O << Asm->Mang->getMangledName(GV);
     } else {
-      PrintRelDirective();
       O << "0x0";
     }
 

Modified: llvm/branches/Apple/Leela/lib/Target/TargetLoweringObjectFile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Leela/lib/Target/TargetLoweringObjectFile.cpp?rev=89380&r1=89379&r2=89380&view=diff

==============================================================================
--- llvm/branches/Apple/Leela/lib/Target/TargetLoweringObjectFile.cpp (original)
+++ llvm/branches/Apple/Leela/lib/Target/TargetLoweringObjectFile.cpp Thu Nov 19 13:22:24 2009
@@ -782,8 +782,8 @@
   }
 
   // Exception Handling.
-  LSDASection = getMachOSection("__TEXT", "__gcc_except_tab", 0,
-                                SectionKind::getReadOnlyWithRel());
+  LSDASection = getMachOSection("__DATA", "__gcc_except_tab", 0,
+                                SectionKind::getDataRel());
   EHFrameSection =
     getMachOSection("__TEXT", "__eh_frame",
                     MCSectionMachO::S_COALESCED |





More information about the llvm-branch-commits mailing list