[llvm-commits] [llvm] r63058 - in /llvm/trunk: include/llvm/Target/TargetAsmInfo.h lib/CodeGen/AsmPrinter/DwarfWriter.cpp lib/Target/TargetAsmInfo.cpp
Scott Michel
scottm at aero.org
Mon Jan 26 14:32:52 PST 2009
Author: pingbak
Date: Mon Jan 26 16:32:51 2009
New Revision: 63058
URL: http://llvm.org/viewvc/llvm-project?rev=63058&view=rev
Log:
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.
Modified:
llvm/trunk/include/llvm/Target/TargetAsmInfo.h
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
llvm/trunk/lib/Target/TargetAsmInfo.cpp
Modified: llvm/trunk/include/llvm/Target/TargetAsmInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetAsmInfo.h?rev=63058&r1=63057&r2=63058&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Target/TargetAsmInfo.h (original)
+++ llvm/trunk/include/llvm/Target/TargetAsmInfo.h Mon Jan 26 16:32:51 2009
@@ -429,27 +429,31 @@
/// HasLEB128 - True if target asm supports leb128 directives.
///
bool HasLEB128; // Defaults to false.
-
+
/// hasDotLocAndDotFile - True if target asm supports .loc and .file
/// directives for emitting debugging information.
///
bool HasDotLocAndDotFile; // Defaults to false.
-
+
/// SupportsDebugInformation - True if target supports emission of debugging
/// information.
bool SupportsDebugInformation;
-
+
/// SupportsExceptionHandling - True if target supports
/// exception handling.
///
bool SupportsExceptionHandling; // Defaults to false.
-
+
/// RequiresFrameSection - true if the Dwarf2 output needs a frame section
///
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.
- ///
+ ///
bool NonLocalEHFrameLabel; // Defaults to false.
/// GlobalEHDirective - This is the directive used to make exception frame
@@ -818,6 +822,9 @@
bool doesDwarfRequireFrameSection() const {
return DwarfRequiresFrameSection;
}
+ bool doesSupportMacInfoSection() const {
+ return SupportsMacInfoSection;
+ }
bool doesRequireNonLocalEHFrameLabel() const {
return NonLocalEHFrameLabel;
}
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp?rev=63058&r1=63057&r2=63058&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp Mon Jan 26 16:32:51 2009
@@ -2167,8 +2167,10 @@
EmitLabel("section_abbrev", 0);
Asm->SwitchToDataSection(TAI->getDwarfARangesSection());
EmitLabel("section_aranges", 0);
- Asm->SwitchToDataSection(TAI->getDwarfMacInfoSection());
- EmitLabel("section_macinfo", 0);
+ if (TAI->doesSupportMacInfoSection()) {
+ Asm->SwitchToDataSection(TAI->getDwarfMacInfoSection());
+ EmitLabel("section_macinfo", 0);
+ }
Asm->SwitchToDataSection(TAI->getDwarfLineSection());
EmitLabel("section_line", 0);
Asm->SwitchToDataSection(TAI->getDwarfLocSection());
@@ -2755,10 +2757,12 @@
/// EmitDebugMacInfo - Emit visible names into a debug macinfo section.
///
void EmitDebugMacInfo() {
- // Start the dwarf macinfo section.
- Asm->SwitchToDataSection(TAI->getDwarfMacInfoSection());
+ if (TAI->doesSupportMacInfoSection()) {
+ // Start the dwarf macinfo section.
+ Asm->SwitchToDataSection(TAI->getDwarfMacInfoSection());
- Asm->EOL();
+ Asm->EOL();
+ }
}
/// ConstructCompileUnits - Create a compile unit DIEs.
Modified: llvm/trunk/lib/Target/TargetAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetAsmInfo.cpp?rev=63058&r1=63057&r2=63058&view=diff
==============================================================================
--- llvm/trunk/lib/Target/TargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/TargetAsmInfo.cpp Mon Jan 26 16:32:51 2009
@@ -99,6 +99,7 @@
SupportsDebugInformation = false;
SupportsExceptionHandling = false;
DwarfRequiresFrameSection = true;
+ SupportsMacInfoSection = true;
NonLocalEHFrameLabel = false;
GlobalEHDirective = 0;
SupportsWeakOmittedEHFrame = true;
More information about the llvm-commits
mailing list