[llvm-commits] [llvm] r89279 - in /llvm/trunk/lib: CodeGen/AsmPrinter/DwarfException.cpp Target/TargetLoweringObjectFile.cpp

Bill Wendling isanbard at gmail.com
Wed Nov 18 16:09:14 PST 2009


Author: void
Date: Wed Nov 18 18:09:14 2009
New Revision: 89279

URL: http://llvm.org/viewvc/llvm-project?rev=89279&view=rev
Log:
The "ReadOnlyWithRel" enum seems to apply more to what Darwin does with the EH
exception table than DataRel.

Modified:
    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp
    llvm/trunk/lib/Target/TargetLoweringObjectFile.cpp

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp?rev=89279&r1=89278&r2=89279&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp Wed Nov 18 18:09:14 2009
@@ -728,7 +728,7 @@
     // in target-independent code.
     //
     if ((LSDASection->getKind().isWriteable() &&
-         !LSDASection->getKind().isDataRel()) ||
+         !LSDASection->getKind().isReadOnlyWithRel()) ||
         Asm->TM.getRelocationModel() == Reloc::Static)
       TTypeFormat = dwarf::DW_EH_PE_absptr;
     else
@@ -922,11 +922,11 @@
   unsigned Index = 1;
 
   for (std::vector<GlobalVariable *>::const_reverse_iterator
-         I = TypeInfos.rbegin(), E = TypeInfos.rend(); I != E; ++I, ++Index) {
+         I = TypeInfos.rbegin(), E = TypeInfos.rend(); I != E; ++I) {
     const GlobalVariable *TI = *I;
 
     if (TI) {
-      if (!LSDASection->getKind().isDataRel() &&
+      if (!LSDASection->getKind().isReadOnlyWithRel() &&
           (TTypeFormat == dwarf::DW_EH_PE_absptr ||
            TI->getLinkage() == GlobalValue::InternalLinkage)) {
         // Print out the unadorned name of the type info.
@@ -940,7 +940,8 @@
                                                 IsTypeInfoPCRel);
 
         if (!IsTypeInfoPCRel)
-          TypeInfoRef = CreateLabelDiff(TypeInfoRef, "typeinforef_addr", Index);
+          TypeInfoRef = CreateLabelDiff(TypeInfoRef, "typeinforef_addr",
+                                        Index++);
 
         O << MAI->getData32bitsDirective();
         TypeInfoRef->print(O, MAI);

Modified: llvm/trunk/lib/Target/TargetLoweringObjectFile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetLoweringObjectFile.cpp?rev=89279&r1=89278&r2=89279&view=diff

==============================================================================
--- llvm/trunk/lib/Target/TargetLoweringObjectFile.cpp (original)
+++ llvm/trunk/lib/Target/TargetLoweringObjectFile.cpp Wed Nov 18 18:09:14 2009
@@ -784,7 +784,7 @@
 
   // Exception Handling.
   LSDASection = getMachOSection("__TEXT", "__gcc_except_tab", 0,
-                                SectionKind::getDataRel());
+                                SectionKind::getReadOnlyWithRel());
   EHFrameSection =
     getMachOSection("__TEXT", "__eh_frame",
                     MCSectionMachO::S_COALESCED |





More information about the llvm-commits mailing list