Make the Dwarf macro information section optional; CellSPU's assembler

doesn't support it. The default is set to 'true', so this should not
impact any other target backends.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63058 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Scott Michel 2009-01-26 22:32:51 +00:00
parent 92f4f16a19
commit 210de72cd7
3 changed files with 22 additions and 10 deletions

View File

@ -429,27 +429,31 @@ namespace llvm {
/// HasLEB128 - True if target asm supports leb128 directives. /// HasLEB128 - True if target asm supports leb128 directives.
/// ///
bool HasLEB128; // Defaults to false. bool HasLEB128; // Defaults to false.
/// hasDotLocAndDotFile - True if target asm supports .loc and .file /// hasDotLocAndDotFile - True if target asm supports .loc and .file
/// directives for emitting debugging information. /// directives for emitting debugging information.
/// ///
bool HasDotLocAndDotFile; // Defaults to false. bool HasDotLocAndDotFile; // Defaults to false.
/// SupportsDebugInformation - True if target supports emission of debugging /// SupportsDebugInformation - True if target supports emission of debugging
/// information. /// information.
bool SupportsDebugInformation; bool SupportsDebugInformation;
/// SupportsExceptionHandling - True if target supports /// SupportsExceptionHandling - True if target supports
/// exception handling. /// exception handling.
/// ///
bool SupportsExceptionHandling; // Defaults to false. bool SupportsExceptionHandling; // Defaults to false.
/// RequiresFrameSection - true if the Dwarf2 output needs a frame section /// RequiresFrameSection - true if the Dwarf2 output needs a frame section
/// ///
bool DwarfRequiresFrameSection; // Defaults to true. bool DwarfRequiresFrameSection; // Defaults to true.
/// SupportsMacInfo - true if the Dwarf output supports macro information
///
bool SupportsMacInfoSection; // Defaults to true
/// NonLocalEHFrameLabel - If set, the EH_frame label needs to be non-local. /// NonLocalEHFrameLabel - If set, the EH_frame label needs to be non-local.
/// ///
bool NonLocalEHFrameLabel; // Defaults to false. bool NonLocalEHFrameLabel; // Defaults to false.
/// GlobalEHDirective - This is the directive used to make exception frame /// GlobalEHDirective - This is the directive used to make exception frame
@ -818,6 +822,9 @@ namespace llvm {
bool doesDwarfRequireFrameSection() const { bool doesDwarfRequireFrameSection() const {
return DwarfRequiresFrameSection; return DwarfRequiresFrameSection;
} }
bool doesSupportMacInfoSection() const {
return SupportsMacInfoSection;
}
bool doesRequireNonLocalEHFrameLabel() const { bool doesRequireNonLocalEHFrameLabel() const {
return NonLocalEHFrameLabel; return NonLocalEHFrameLabel;
} }

View File

@ -2167,8 +2167,10 @@ private:
EmitLabel("section_abbrev", 0); EmitLabel("section_abbrev", 0);
Asm->SwitchToDataSection(TAI->getDwarfARangesSection()); Asm->SwitchToDataSection(TAI->getDwarfARangesSection());
EmitLabel("section_aranges", 0); EmitLabel("section_aranges", 0);
Asm->SwitchToDataSection(TAI->getDwarfMacInfoSection()); if (TAI->doesSupportMacInfoSection()) {
EmitLabel("section_macinfo", 0); Asm->SwitchToDataSection(TAI->getDwarfMacInfoSection());
EmitLabel("section_macinfo", 0);
}
Asm->SwitchToDataSection(TAI->getDwarfLineSection()); Asm->SwitchToDataSection(TAI->getDwarfLineSection());
EmitLabel("section_line", 0); EmitLabel("section_line", 0);
Asm->SwitchToDataSection(TAI->getDwarfLocSection()); Asm->SwitchToDataSection(TAI->getDwarfLocSection());
@ -2755,10 +2757,12 @@ private:
/// EmitDebugMacInfo - Emit visible names into a debug macinfo section. /// EmitDebugMacInfo - Emit visible names into a debug macinfo section.
/// ///
void EmitDebugMacInfo() { void EmitDebugMacInfo() {
// Start the dwarf macinfo section. if (TAI->doesSupportMacInfoSection()) {
Asm->SwitchToDataSection(TAI->getDwarfMacInfoSection()); // Start the dwarf macinfo section.
Asm->SwitchToDataSection(TAI->getDwarfMacInfoSection());
Asm->EOL(); Asm->EOL();
}
} }
/// ConstructCompileUnits - Create a compile unit DIEs. /// ConstructCompileUnits - Create a compile unit DIEs.

View File

@ -99,6 +99,7 @@ void TargetAsmInfo::fillDefaultValues() {
SupportsDebugInformation = false; SupportsDebugInformation = false;
SupportsExceptionHandling = false; SupportsExceptionHandling = false;
DwarfRequiresFrameSection = true; DwarfRequiresFrameSection = true;
SupportsMacInfoSection = true;
NonLocalEHFrameLabel = false; NonLocalEHFrameLabel = false;
GlobalEHDirective = 0; GlobalEHDirective = 0;
SupportsWeakOmittedEHFrame = true; SupportsWeakOmittedEHFrame = true;