Fix a FIXME: DwarfRequiresRelocationForSectionOffset is the same as
authorRafael Espindola <rafael.espindola@gmail.com>
Fri, 22 Jun 2012 13:24:07 +0000 (13:24 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Fri, 22 Jun 2012 13:24:07 +0000 (13:24 +0000)
DwarfUsesRelocationsAcrossSections.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158992 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/MC/MCAsmInfo.h
lib/CodeGen/AsmPrinter/DwarfDebug.cpp
lib/MC/MCAsmInfo.cpp
lib/MC/MCAsmInfoDarwin.cpp
lib/MC/MCDwarf.cpp

index 21b484c1c0fd116bbacf4c00b9d2052bda2b6cae..a353565d5d2d3b795a9061503749ca171c257513 100644 (file)
@@ -315,14 +315,8 @@ namespace llvm {
     /// DwarfSectionOffsetDirective - Special section offset directive.
     const char* DwarfSectionOffsetDirective; // Defaults to NULL
 
-    /// DwarfRequiresRelocationForSectionOffset - True if we need to produce a
-    /// relocation when we want a section offset in dwarf.
-    bool DwarfRequiresRelocationForSectionOffset;  // Defaults to true;
-
     /// DwarfUsesRelocationsAcrossSections - True if Dwarf2 output generally
     /// uses relocations for references to other .debug_* sections.
-    // FIXME: Can we replace DwarfRequiresRelocationForSectionOffset
-    // with this?
     bool DwarfUsesRelocationsAcrossSections;
 
     /// DwarfUsesRelocationsForStringPool - True if this Dwarf output must use
@@ -551,9 +545,6 @@ namespace llvm {
     const char *getDwarfSectionOffsetDirective() const {
       return DwarfSectionOffsetDirective;
     }
-    bool doesDwarfRequireRelocationForSectionOffset() const {
-      return DwarfRequiresRelocationForSectionOffset;
-    }
     bool doesDwarfUseRelocationsAcrossSections() const {
       return DwarfUsesRelocationsAcrossSections;
     }
index 1e4ef5fbdbb8a881e5b67645a173b5a36acd9872..d0ab258b29c92fc4aa30bc5dd12e8e05ec77cf77 100644 (file)
@@ -566,7 +566,7 @@ CompileUnit *DwarfDebug::constructCompileUnit(const MDNode *N) {
   NewCU->addUInt(Die, dwarf::DW_AT_low_pc, dwarf::DW_FORM_addr, 0);
   // DW_AT_stmt_list is a offset of line number information for this
   // compile unit in debug_line section.
-  if (Asm->MAI->doesDwarfRequireRelocationForSectionOffset())
+  if (Asm->MAI->doesDwarfUseRelocationsAcrossSections())
     NewCU->addLabel(Die, dwarf::DW_AT_stmt_list, dwarf::DW_FORM_data4,
                     Asm->GetTempSymbol("section_line"));
   else
index beb20e8f15987241900bbec93de024fed600d561..6e659506b9d91c21ac2e0b9900a3a3fc9b33c7fe 100644 (file)
@@ -84,7 +84,6 @@ MCAsmInfo::MCAsmInfo() {
   SupportsDebugInformation = false;
   ExceptionsType = ExceptionHandling::None;
   DwarfUsesInlineInfoSection = false;
-  DwarfRequiresRelocationForSectionOffset = true;
   DwarfSectionOffsetDirective = 0;
   DwarfUsesRelocationsAcrossSections = true;
   DwarfUsesRelocationsForStringPool = true;
index 7c271a9e824b910e2900062a126f11b5a6239561..4c4f5edc83e3639813e7b2ea4b8e3009bde39763 100644 (file)
@@ -59,7 +59,6 @@ MCAsmInfoDarwin::MCAsmInfoDarwin() {
   HasNoDeadStrip = true;
   HasSymbolResolver = true;
 
-  DwarfRequiresRelocationForSectionOffset = false;
   DwarfUsesRelocationsAcrossSections = false;
   DwarfUsesRelocationsForStringPool = false;
 }
index 91864fb7a8a8d3debcc733c114464c6986783b78..918045b152a9304b180c6e39af3dc11822e7c6cb 100644 (file)
@@ -705,7 +705,7 @@ void MCGenDwarfInfo::Emit(MCStreamer *MCOS, const MCSymbol *LineSectionSymbol) {
   MCOS->SwitchSection(context.getObjectFileInfo()->getDwarfInfoSection());
   MCOS->SwitchSection(context.getObjectFileInfo()->getDwarfAbbrevSection());
   MCSymbol *AbbrevSectionSymbol;
-  if (AsmInfo.doesDwarfRequireRelocationForSectionOffset()) {
+  if (AsmInfo.doesDwarfUseRelocationsAcrossSections()) {
     AbbrevSectionSymbol = context.CreateTempSymbol();
     MCOS->EmitLabel(AbbrevSectionSymbol);
   } else {
@@ -1285,7 +1285,7 @@ MCSymbol *FrameEmitterImpl::EmitFDE(MCStreamer &streamer,
                                                  0);
     if (verboseAsm) streamer.AddComment("FDE CIE Offset");
     streamer.EmitAbsValue(offset, 4);
-  } else if (!asmInfo.doesDwarfRequireRelocationForSectionOffset()) {
+  } else if (!asmInfo.doesDwarfUseRelocationsAcrossSections()) {
     const MCExpr *offset = MakeStartMinusEndExpr(streamer, *SectionStart,
                                                  cieStart, 0);
     streamer.EmitAbsValue(offset, 4);