[llvm] r313079 - Remove -generate-dwarf-pub-sections flag.

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 12 14:50:55 PDT 2017


Author: pcc
Date: Tue Sep 12 14:50:55 2017
New Revision: 313079

URL: http://llvm.org/viewvc/llvm-project?rev=313079&view=rev
Log:
Remove -generate-dwarf-pub-sections flag.

This flag is unnecessary for testing because we can get the coverage
we need by adjusting CU attributes.

Differential Revision: https://reviews.llvm.org/D37725

Modified:
    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
    llvm/trunk/test/DebugInfo/Generic/dwarf-public-names.ll
    llvm/trunk/test/DebugInfo/X86/2010-04-13-PubType.ll
    llvm/trunk/test/DebugInfo/X86/c-type-units.ll
    llvm/trunk/test/DebugInfo/X86/gnu-public-names-gmlt.ll

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp?rev=313079&r1=313078&r2=313079&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp Tue Sep 12 14:50:55 2017
@@ -52,16 +52,6 @@
 
 using namespace llvm;
 
-enum DefaultOnOff { Default, Enable, Disable };
-
-static cl::opt<DefaultOnOff>
-DwarfPubSections("generate-dwarf-pub-sections", cl::Hidden,
-                 cl::desc("Generate DWARF pubnames and pubtypes sections"),
-                 cl::values(clEnumVal(Default, "Default for platform"),
-                            clEnumVal(Enable, "Enabled"),
-                            clEnumVal(Disable, "Disabled")),
-                 cl::init(Default));
-
 DwarfCompileUnit::DwarfCompileUnit(unsigned UID, const DICompileUnit *Node,
                                    AsmPrinter *A, DwarfDebug *DW,
                                    DwarfFile *DWU)
@@ -771,10 +761,7 @@ bool DwarfCompileUnit::hasDwarfPubSectio
   if (CUNode->getGnuPubnames())
     return true;
 
-  if (DwarfPubSections == Default)
-    return DD->tuneForGDB() && !includeMinimalInlineScopes();
-
-  return DwarfPubSections == Enable;
+  return DD->tuneForGDB() && !includeMinimalInlineScopes();
 }
 
 /// addGlobalName - Add a new global name to the compile unit.

Modified: llvm/trunk/test/DebugInfo/Generic/dwarf-public-names.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/Generic/dwarf-public-names.ll?rev=313079&r1=313078&r2=313079&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/Generic/dwarf-public-names.ll (original)
+++ llvm/trunk/test/DebugInfo/Generic/dwarf-public-names.ll Tue Sep 12 14:50:55 2017
@@ -1,6 +1,6 @@
 ; REQUIRES: object-emission
 
-; RUN: %llc_dwarf -generate-dwarf-pub-sections=Enable -filetype=obj -o %t.o < %s
+; RUN: %llc_dwarf -debugger-tune=gdb -filetype=obj -o %t.o < %s
 ; RUN: llvm-dwarfdump -debug-pubnames %t.o | FileCheck %s
 ; ModuleID = 'dwarf-public-names.cpp'
 ;

Modified: llvm/trunk/test/DebugInfo/X86/2010-04-13-PubType.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/2010-04-13-PubType.ll?rev=313079&r1=313078&r2=313079&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/2010-04-13-PubType.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/2010-04-13-PubType.ll Tue Sep 12 14:50:55 2017
@@ -1,4 +1,4 @@
-; RUN: llc -O0 -asm-verbose -mtriple=x86_64-macosx -generate-dwarf-pub-sections=Enable < %s | FileCheck %s
+; RUN: llc -O0 -asm-verbose -mtriple=x86_64-macosx -debugger-tune=gdb < %s | FileCheck %s
 ; CHECK-NOT: .asciz "X" ## External Name
 ; CHECK: .asciz "Y" ## External Name
 ; Test to check type with no definition is listed in pubtypes section.

Modified: llvm/trunk/test/DebugInfo/X86/c-type-units.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/c-type-units.ll?rev=313079&r1=313078&r2=313079&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/c-type-units.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/c-type-units.ll Tue Sep 12 14:50:55 2017
@@ -1,6 +1,6 @@
 ; REQUIRES: object-emission
 
-; RUN: llc -o - %s -filetype=obj -O0 -generate-dwarf-pub-sections=Disable -generate-type-units -mtriple=x86_64-unknown-linux-gnu | llvm-dwarfdump -debug-types - | FileCheck %s
+; RUN: llc -o - %s -filetype=obj -O0 -debugger-tune=lldb -generate-type-units -mtriple=x86_64-unknown-linux-gnu | llvm-dwarfdump -debug-types - | FileCheck %s
 
 ; struct foo {
 ; } f;

Modified: llvm/trunk/test/DebugInfo/X86/gnu-public-names-gmlt.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/gnu-public-names-gmlt.ll?rev=313079&r1=313078&r2=313079&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/gnu-public-names-gmlt.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/gnu-public-names-gmlt.ll Tue Sep 12 14:50:55 2017
@@ -1,5 +1,4 @@
-; RUN: sed -e 's/gnuPubnames: false/gnuPubnames: true/' %s | llc -mtriple=x86_64-pc-linux-gnu -filetype=obj | llvm-dwarfdump -v - | FileCheck --check-prefix=GPUB --check-prefix=CHECK %s
-; RUN: llc -mtriple=x86_64-pc-linux-gnu -filetype=obj < %s -generate-dwarf-pub-sections=Enable | llvm-dwarfdump -v - | FileCheck --check-prefix=PUB --check-prefix=CHECK %s
+; RUN: sed -e 's/gnuPubnames: false/gnuPubnames: true/' %s | llc -mtriple=x86_64-pc-linux-gnu -filetype=obj | llvm-dwarfdump -v - | FileCheck --check-prefix=GPUB %s
 ; RUN: llc -mtriple=x86_64-pc-linux-gnu -filetype=obj < %s | llvm-dwarfdump -v - | FileCheck --check-prefix=NONE %s
 
 ; Generated from:
@@ -16,16 +15,14 @@
 ; GPUB: DW_AT_GNU_pubnames
 
 ; GPUB: .debug_gnu_pubnames contents:
-; PUB: .debug_pubnames contents:
-; CHECK-NEXT: unit_offset = 0x00000000
-; CHECK-NEXT: Name
-; CHECK-NEXT: "f2"
-; CHECK-NEXT: "f3"
+; GPUB-NEXT: unit_offset = 0x00000000
+; GPUB-NEXT: Name
+; GPUB-NEXT: "f2"
+; GPUB-NEXT: "f3"
 
 ; GPUB: .debug_gnu_pubtypes contents:
-; PUB: .debug_pubtypes contents:
-; CHECK-NEXT: length = 0x0000000e version = 0x0002 unit_offset = 0x00000000
-; CHECK-NEXT: Name
+; GPUB-NEXT: length = 0x0000000e version = 0x0002 unit_offset = 0x00000000
+; GPUB-NEXT: Name
 
 ; NONE: .debug_pubnames contents:
 ; NONE: {{^$}}




More information about the llvm-commits mailing list