[llvm-commits] [llvm] r73736 - in /llvm/trunk: include/llvm/Target/TargetAsmInfo.h lib/CodeGen/AsmPrinter/DwarfDebug.cpp lib/Target/ARM/ARMTargetAsmInfo.cpp lib/Target/CellSPU/SPUTargetAsmInfo.cpp lib/Target/PowerPC/PPCTargetAsmInfo.cpp lib/Target/TargetAsmInfo.cpp lib/Target/X86/X86TargetAsmInfo.cpp lib/Target/XCore/XCoreTargetAsmInfo.cpp

Chris Lattner sabre at nondot.org
Thu Jun 18 16:31:37 PDT 2009


Author: lattner
Date: Thu Jun 18 18:31:37 2009
New Revision: 73736

URL: http://llvm.org/viewvc/llvm-project?rev=73736&view=rev
Log:
simplify macro debug info directive handling.

Modified:
    llvm/trunk/include/llvm/Target/TargetAsmInfo.h
    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
    llvm/trunk/lib/Target/ARM/ARMTargetAsmInfo.cpp
    llvm/trunk/lib/Target/CellSPU/SPUTargetAsmInfo.cpp
    llvm/trunk/lib/Target/PowerPC/PPCTargetAsmInfo.cpp
    llvm/trunk/lib/Target/TargetAsmInfo.cpp
    llvm/trunk/lib/Target/X86/X86TargetAsmInfo.cpp
    llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.cpp

Modified: llvm/trunk/include/llvm/Target/TargetAsmInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetAsmInfo.h?rev=73736&r1=73735&r2=73736&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Target/TargetAsmInfo.h (original)
+++ llvm/trunk/include/llvm/Target/TargetAsmInfo.h Thu Jun 18 18:31:37 2009
@@ -472,10 +472,6 @@
     /// encode inline subroutine information.
     bool DwarfUsesInlineInfoSection; // Defaults to false.
 
-    /// 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.
@@ -536,9 +532,9 @@
     ///
     const char *DwarfRangesSection; // Defaults to ".debug_ranges".
 
-    /// DwarfMacInfoSection - Section directive for Dwarf info.
+    /// DwarfMacroInfoSection - Section directive for DWARF macro info.
     ///
-    const char *DwarfMacInfoSection; // Defaults to ".debug_macinfo".
+    const char *DwarfMacroInfoSection; // Defaults to ".debug_macinfo".
     
     /// DwarfEHFrameSection - Section directive for Exception frames.
     ///
@@ -866,9 +862,6 @@
     bool doesDwarfUsesInlineInfoSection() const {
       return DwarfUsesInlineInfoSection;
     }
-    bool doesSupportMacInfoSection() const {
-      return SupportsMacInfoSection;
-    }
     bool doesRequireNonLocalEHFrameLabel() const {
       return NonLocalEHFrameLabel;
     }
@@ -914,8 +907,8 @@
     const char *getDwarfRangesSection() const {
       return DwarfRangesSection;
     }
-    const char *getDwarfMacInfoSection() const {
-      return DwarfMacInfoSection;
+    const char *getDwarfMacroInfoSection() const {
+      return DwarfMacroInfoSection;
     }
     const char *getDwarfEHFrameSection() const {
       return DwarfEHFrameSection;

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=73736&r1=73735&r2=73736&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Thu Jun 18 18:31:37 2009
@@ -1995,8 +1995,8 @@
   Asm->SwitchToDataSection(TAI->getDwarfARangesSection());
   EmitLabel("section_aranges", 0);
 
-  if (TAI->doesSupportMacInfoSection()) {
-    Asm->SwitchToDataSection(TAI->getDwarfMacInfoSection());
+  if (const char *LineInfoDirective = TAI->getDwarfMacroInfoSection()) {
+    Asm->SwitchToDataSection(LineInfoDirective);
     EmitLabel("section_macinfo", 0);
   }
 
@@ -2542,9 +2542,9 @@
 /// EmitDebugMacInfo - Emit visible names into a debug macinfo section.
 ///
 void DwarfDebug::EmitDebugMacInfo() {
-  if (TAI->doesSupportMacInfoSection()) {
+  if (const char *LineInfoDirective = TAI->getDwarfMacroInfoSection()) {
     // Start the dwarf macinfo section.
-    Asm->SwitchToDataSection(TAI->getDwarfMacInfoSection());
+    Asm->SwitchToDataSection(LineInfoDirective);
     Asm->EOL();
   }
 }

Modified: llvm/trunk/lib/Target/ARM/ARMTargetAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMTargetAsmInfo.cpp?rev=73736&r1=73735&r2=73736&view=diff

==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMTargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMTargetAsmInfo.cpp Thu Jun 18 18:31:37 2009
@@ -90,7 +90,7 @@
   DwarfLocSection = ".section __DWARF,__debug_loc,regular,debug";
   DwarfARangesSection = ".section __DWARF,__debug_aranges,regular,debug";
   DwarfRangesSection = ".section __DWARF,__debug_ranges,regular,debug";
-  DwarfMacInfoSection = ".section __DWARF,__debug_macinfo,regular,debug";
+  DwarfMacroInfoSection = ".section __DWARF,__debug_macinfo,regular,debug";
 }
 
 ARMELFTargetAsmInfo::ARMELFTargetAsmInfo(const ARMTargetMachine &TM):
@@ -115,7 +115,7 @@
   DwarfLocSection =     "\t.section\t.debug_loc,\"\",%progbits";
   DwarfARangesSection = "\t.section\t.debug_aranges,\"\",%progbits";
   DwarfRangesSection =  "\t.section\t.debug_ranges,\"\",%progbits";
-  DwarfMacInfoSection = "\t.section\t.debug_macinfo,\"\",%progbits";
+  DwarfMacroInfoSection = "\t.section\t.debug_macinfo,\"\",%progbits";
 
   if (Subtarget->isAAPCS_ABI()) {
     StaticCtorsSection = "\t.section .init_array,\"aw\",%init_array";

Modified: llvm/trunk/lib/Target/CellSPU/SPUTargetAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/SPUTargetAsmInfo.cpp?rev=73736&r1=73735&r2=73736&view=diff

==============================================================================
--- llvm/trunk/lib/Target/CellSPU/SPUTargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/CellSPU/SPUTargetAsmInfo.cpp Thu Jun 18 18:31:37 2009
@@ -41,7 +41,6 @@
 
   SupportsDebugInformation = true;
   NeedsSet = true;
-  SupportsMacInfoSection = false;
   DwarfAbbrevSection =  "\t.section        .debug_abbrev,\"\", at progbits";
   DwarfInfoSection =    "\t.section        .debug_info,\"\", at progbits";
   DwarfLineSection =    "\t.section        .debug_line,\"\", at progbits";
@@ -52,7 +51,7 @@
   DwarfLocSection =     "\t.section        .debug_loc,\"\", at progbits";
   DwarfARangesSection = "\t.section        .debug_aranges,\"\", at progbits";
   DwarfRangesSection =  "\t.section        .debug_ranges,\"\", at progbits";
-  DwarfMacInfoSection = "\t.section        .debug_macinfo,\"\",progbits";
+  DwarfMacroInfoSection = 0;  // macro info not supported.
 
   // Exception handling is not supported on CellSPU (think about it: you only
   // have 256K for code+data. Would you support exception handling?)

Modified: llvm/trunk/lib/Target/PowerPC/PPCTargetAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCTargetAsmInfo.cpp?rev=73736&r1=73735&r2=73736&view=diff

==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCTargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCTargetAsmInfo.cpp Thu Jun 18 18:31:37 2009
@@ -64,7 +64,7 @@
   DwarfLocSection = ".section __DWARF,__debug_loc,regular,debug";
   DwarfARangesSection = ".section __DWARF,__debug_aranges,regular,debug";
   DwarfRangesSection = ".section __DWARF,__debug_ranges,regular,debug";
-  DwarfMacInfoSection = ".section __DWARF,__debug_macinfo,regular,debug";
+  DwarfMacroInfoSection = ".section __DWARF,__debug_macinfo,regular,debug";
   
   // In non-PIC modes, emit a special label before jump tables so that the
   // linker can perform more accurate dead code stripping.
@@ -130,7 +130,7 @@
   DwarfLocSection =     "\t.section\t.debug_loc,\"\", at progbits";
   DwarfARangesSection = "\t.section\t.debug_aranges,\"\", at progbits";
   DwarfRangesSection =  "\t.section\t.debug_ranges,\"\", at progbits";
-  DwarfMacInfoSection = "\t.section\t.debug_macinfo,\"\", at progbits";
+  DwarfMacroInfoSection = "\t.section\t.debug_macinfo,\"\", at progbits";
 
   PCSymbol = ".";
 

Modified: llvm/trunk/lib/Target/TargetAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetAsmInfo.cpp?rev=73736&r1=73735&r2=73736&view=diff

==============================================================================
--- llvm/trunk/lib/Target/TargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/TargetAsmInfo.cpp Thu Jun 18 18:31:37 2009
@@ -102,7 +102,6 @@
   SupportsExceptionHandling = false;
   DwarfRequiresFrameSection = true;
   DwarfUsesInlineInfoSection = false;
-  SupportsMacInfoSection = true;
   NonLocalEHFrameLabel = false;
   GlobalEHDirective = 0;
   SupportsWeakOmittedEHFrame = true;
@@ -118,7 +117,7 @@
   DwarfLocSection = ".debug_loc";
   DwarfARangesSection = ".debug_aranges";
   DwarfRangesSection = ".debug_ranges";
-  DwarfMacInfoSection = ".debug_macinfo";
+  DwarfMacroInfoSection = ".debug_macinfo";
   DwarfEHFrameSection = ".eh_frame";
   DwarfExceptionSection = ".gcc_except_table";
   AsmTransCBE = 0;

Modified: llvm/trunk/lib/Target/X86/X86TargetAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86TargetAsmInfo.cpp?rev=73736&r1=73735&r2=73736&view=diff

==============================================================================
--- llvm/trunk/lib/Target/X86/X86TargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86TargetAsmInfo.cpp Thu Jun 18 18:31:37 2009
@@ -118,7 +118,7 @@
   DwarfLocSection = ".section __DWARF,__debug_loc,regular,debug";
   DwarfARangesSection = ".section __DWARF,__debug_aranges,regular,debug";
   DwarfRangesSection = ".section __DWARF,__debug_ranges,regular,debug";
-  DwarfMacInfoSection = ".section __DWARF,__debug_macinfo,regular,debug";
+  DwarfMacroInfoSection = ".section __DWARF,__debug_macinfo,regular,debug";
 
   // Exceptions handling
   SupportsExceptionHandling = true;
@@ -176,7 +176,7 @@
   DwarfLocSection =     "\t.section\t.debug_loc,\"\", at progbits";
   DwarfARangesSection = "\t.section\t.debug_aranges,\"\", at progbits";
   DwarfRangesSection =  "\t.section\t.debug_ranges,\"\", at progbits";
-  DwarfMacInfoSection = "\t.section\t.debug_macinfo,\"\", at progbits";
+  DwarfMacroInfoSection = "\t.section\t.debug_macinfo,\"\", at progbits";
 
   // Exceptions handling
   SupportsExceptionHandling = true;
@@ -259,7 +259,7 @@
   DwarfLocSection =     "\t.section\t.debug_loc,\"dr\"";
   DwarfARangesSection = "\t.section\t.debug_aranges,\"dr\"";
   DwarfRangesSection =  "\t.section\t.debug_ranges,\"dr\"";
-  DwarfMacInfoSection = "\t.section\t.debug_macinfo,\"dr\"";
+  DwarfMacroInfoSection = "\t.section\t.debug_macinfo,\"dr\"";
 }
 
 unsigned

Modified: llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.cpp?rev=73736&r1=73735&r2=73736&view=diff

==============================================================================
--- llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/XCore/XCoreTargetAsmInfo.cpp Thu Jun 18 18:31:37 2009
@@ -64,7 +64,7 @@
   DwarfLocSection = "\t.section\t.debug_loc,\"\", at progbits";
   DwarfARangesSection = "\t.section\t.debug_aranges,\"\", at progbits";
   DwarfRangesSection = "\t.section\t.debug_ranges,\"\", at progbits";
-  DwarfMacInfoSection = "\t.section\t.debug_macinfo,\"\", at progbits";
+  DwarfMacroInfoSection = "\t.section\t.debug_macinfo,\"\", at progbits";
 }
 
 const Section*





More information about the llvm-commits mailing list