Skip to content

Commit 034ca0f

Browse files
committed
Remove unused DwarfSectionOffsetDirective string
The value isn't actually used, and setting it emits a COFF specific directive. llvm-svn: 180064
1 parent 04d4e93 commit 034ca0f

File tree

5 files changed

+9
-11
lines changed

5 files changed

+9
-11
lines changed

llvm/include/llvm/MC/MCAsmInfo.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,8 @@ namespace llvm {
217217
/// convention.
218218
bool HasMicrosoftFastStdCallMangling; // Defaults to false.
219219

220+
bool NeedsDwarfSectionOffsetDirective;
221+
220222
//===--- Alignment Information ----------------------------------------===//
221223

222224
/// AlignDirective - The directive used to emit round up to an alignment
@@ -320,9 +322,6 @@ namespace llvm {
320322
/// encode inline subroutine information.
321323
bool DwarfUsesInlineInfoSection; // Defaults to false.
322324

323-
/// DwarfSectionOffsetDirective - Special section offset directive.
324-
const char* DwarfSectionOffsetDirective; // Defaults to NULL
325-
326325
/// DwarfUsesRelocationsAcrossSections - True if Dwarf2 output generally
327326
/// uses relocations for references to other .debug_* sections.
328327
bool DwarfUsesRelocationsAcrossSections;
@@ -412,6 +411,10 @@ namespace llvm {
412411
return HasMicrosoftFastStdCallMangling;
413412
}
414413

414+
bool needsDwarfSectionOffsetDirective() const {
415+
return NeedsDwarfSectionOffsetDirective;
416+
}
417+
415418
// Accessors.
416419
//
417420
bool hasMachoZeroFillDirective() const { return HasMachoZeroFillDirective; }
@@ -557,9 +560,6 @@ namespace llvm {
557560
bool doesDwarfUseInlineInfoSection() const {
558561
return DwarfUsesInlineInfoSection;
559562
}
560-
const char *getDwarfSectionOffsetDirective() const {
561-
return DwarfSectionOffsetDirective;
562-
}
563563
bool doesDwarfUseRelocationsAcrossSections() const {
564564
return DwarfUsesRelocationsAcrossSections;
565565
}

llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ void AsmPrinter::EmitTTypeReference(const GlobalValue *GV,
141141
void AsmPrinter::EmitSectionOffset(const MCSymbol *Label,
142142
const MCSymbol *SectionLabel) const {
143143
// On COFF targets, we have to emit the special .secrel32 directive.
144-
if (MAI->getDwarfSectionOffsetDirective()) {
144+
if (MAI->needsDwarfSectionOffsetDirective()) {
145145
OutStreamer.EmitCOFFSecRel32(Label);
146146
return;
147147
}

llvm/lib/MC/MCAsmInfo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,10 @@ MCAsmInfo::MCAsmInfo() {
8787
SupportsDebugInformation = false;
8888
ExceptionsType = ExceptionHandling::None;
8989
DwarfUsesInlineInfoSection = false;
90-
DwarfSectionOffsetDirective = 0;
9190
DwarfUsesRelocationsAcrossSections = true;
9291
DwarfRegNumForCFI = false;
9392
HasMicrosoftFastStdCallMangling = false;
93+
NeedsDwarfSectionOffsetDirective = false;
9494
}
9595

9696
MCAsmInfo::~MCAsmInfo() {

llvm/lib/MC/MCAsmInfoCOFF.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ MCAsmInfoCOFF::MCAsmInfoCOFF() {
3636
// Set up DWARF directives
3737
HasLEB128 = true; // Target asm supports leb128 directives (little-endian)
3838
SupportsDebugInformation = true;
39-
DwarfSectionOffsetDirective = "\t.secrel32\t";
4039
HasMicrosoftFastStdCallMangling = true;
40+
NeedsDwarfSectionOffsetDirective = true;
4141
}
4242

4343
void MCAsmInfoMicrosoft::anchor() { }

llvm/lib/Target/R600/MCTargetDesc/AMDGPUMCAsmInfo.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ AMDGPUMCAsmInfo::AMDGPUMCAsmInfo(const Target &T, StringRef &TT) : MCAsmInfo() {
6868
//===--- Dwarf Emission Directives -----------------------------------===//
6969
HasLEB128 = true;
7070
SupportsDebugInformation = true;
71-
DwarfSectionOffsetDirective = ".offset";
72-
7371
}
7472

7573
const char*

0 commit comments

Comments
 (0)