Remove unused DwarfSectionOffsetDirective string

The value isn't actually used, and setting it emits a COFF specific
directive.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180064 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Matt Arsenault 2013-04-22 22:49:11 +00:00
parent 3e39731e88
commit 9a0e12a6ed
5 changed files with 9 additions and 11 deletions

View File

@ -217,6 +217,8 @@ namespace llvm {
/// convention. /// convention.
bool HasMicrosoftFastStdCallMangling; // Defaults to false. bool HasMicrosoftFastStdCallMangling; // Defaults to false.
bool NeedsDwarfSectionOffsetDirective;
//===--- Alignment Information ----------------------------------------===// //===--- Alignment Information ----------------------------------------===//
/// AlignDirective - The directive used to emit round up to an alignment /// AlignDirective - The directive used to emit round up to an alignment
@ -320,9 +322,6 @@ namespace llvm {
/// encode inline subroutine information. /// encode inline subroutine information.
bool DwarfUsesInlineInfoSection; // Defaults to false. bool DwarfUsesInlineInfoSection; // Defaults to false.
/// DwarfSectionOffsetDirective - Special section offset directive.
const char* DwarfSectionOffsetDirective; // Defaults to NULL
/// DwarfUsesRelocationsAcrossSections - True if Dwarf2 output generally /// DwarfUsesRelocationsAcrossSections - True if Dwarf2 output generally
/// uses relocations for references to other .debug_* sections. /// uses relocations for references to other .debug_* sections.
bool DwarfUsesRelocationsAcrossSections; bool DwarfUsesRelocationsAcrossSections;
@ -412,6 +411,10 @@ namespace llvm {
return HasMicrosoftFastStdCallMangling; return HasMicrosoftFastStdCallMangling;
} }
bool needsDwarfSectionOffsetDirective() const {
return NeedsDwarfSectionOffsetDirective;
}
// Accessors. // Accessors.
// //
bool hasMachoZeroFillDirective() const { return HasMachoZeroFillDirective; } bool hasMachoZeroFillDirective() const { return HasMachoZeroFillDirective; }
@ -557,9 +560,6 @@ namespace llvm {
bool doesDwarfUseInlineInfoSection() const { bool doesDwarfUseInlineInfoSection() const {
return DwarfUsesInlineInfoSection; return DwarfUsesInlineInfoSection;
} }
const char *getDwarfSectionOffsetDirective() const {
return DwarfSectionOffsetDirective;
}
bool doesDwarfUseRelocationsAcrossSections() const { bool doesDwarfUseRelocationsAcrossSections() const {
return DwarfUsesRelocationsAcrossSections; return DwarfUsesRelocationsAcrossSections;
} }

View File

@ -141,7 +141,7 @@ void AsmPrinter::EmitTTypeReference(const GlobalValue *GV,
void AsmPrinter::EmitSectionOffset(const MCSymbol *Label, void AsmPrinter::EmitSectionOffset(const MCSymbol *Label,
const MCSymbol *SectionLabel) const { const MCSymbol *SectionLabel) const {
// On COFF targets, we have to emit the special .secrel32 directive. // On COFF targets, we have to emit the special .secrel32 directive.
if (MAI->getDwarfSectionOffsetDirective()) { if (MAI->needsDwarfSectionOffsetDirective()) {
OutStreamer.EmitCOFFSecRel32(Label); OutStreamer.EmitCOFFSecRel32(Label);
return; return;
} }

View File

@ -87,10 +87,10 @@ MCAsmInfo::MCAsmInfo() {
SupportsDebugInformation = false; SupportsDebugInformation = false;
ExceptionsType = ExceptionHandling::None; ExceptionsType = ExceptionHandling::None;
DwarfUsesInlineInfoSection = false; DwarfUsesInlineInfoSection = false;
DwarfSectionOffsetDirective = 0;
DwarfUsesRelocationsAcrossSections = true; DwarfUsesRelocationsAcrossSections = true;
DwarfRegNumForCFI = false; DwarfRegNumForCFI = false;
HasMicrosoftFastStdCallMangling = false; HasMicrosoftFastStdCallMangling = false;
NeedsDwarfSectionOffsetDirective = false;
} }
MCAsmInfo::~MCAsmInfo() { MCAsmInfo::~MCAsmInfo() {

View File

@ -36,8 +36,8 @@ MCAsmInfoCOFF::MCAsmInfoCOFF() {
// Set up DWARF directives // Set up DWARF directives
HasLEB128 = true; // Target asm supports leb128 directives (little-endian) HasLEB128 = true; // Target asm supports leb128 directives (little-endian)
SupportsDebugInformation = true; SupportsDebugInformation = true;
DwarfSectionOffsetDirective = "\t.secrel32\t";
HasMicrosoftFastStdCallMangling = true; HasMicrosoftFastStdCallMangling = true;
NeedsDwarfSectionOffsetDirective = true;
} }
void MCAsmInfoMicrosoft::anchor() { } void MCAsmInfoMicrosoft::anchor() { }

View File

@ -68,8 +68,6 @@ AMDGPUMCAsmInfo::AMDGPUMCAsmInfo(const Target &T, StringRef &TT) : MCAsmInfo() {
//===--- Dwarf Emission Directives -----------------------------------===// //===--- Dwarf Emission Directives -----------------------------------===//
HasLEB128 = true; HasLEB128 = true;
SupportsDebugInformation = true; SupportsDebugInformation = true;
DwarfSectionOffsetDirective = ".offset";
} }
const char* const char*