diff options
author | David Blaikie <dblaikie@gmail.com> | 2018-08-16 23:57:15 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2018-08-16 23:57:15 +0000 |
commit | 0e03047e85398a7a33e55ee92c219306727fb192 (patch) | |
tree | 47dace06b13d6d539fc6164ee95ebf31395825de /llvm | |
parent | 2c0fad59dfd1a54e9a76d18aebc8f4fc7e891252 (diff) | |
download | bcm5719-llvm-0e03047e85398a7a33e55ee92c219306727fb192.tar.gz bcm5719-llvm-0e03047e85398a7a33e55ee92c219306727fb192.zip |
DebugInfo: Remove command line (& target-based) disabling of pubnames in favor of metadata
Now that Clang disables NVPTX pubnames via metadata there's no need for
this fallback to target detection in the backend.
llvm-svn: 339970
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | 4 | ||||
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 6 | ||||
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h | 6 | ||||
-rw-r--r-- | llvm/test/DebugInfo/NVPTX/cu-range-hole.ll | 2 | ||||
-rw-r--r-- | llvm/test/DebugInfo/NVPTX/dbg-declare-alloca.ll | 2 | ||||
-rw-r--r-- | llvm/test/DebugInfo/NVPTX/debug-info.ll | 2 | ||||
-rw-r--r-- | llvm/test/DebugInfo/NVPTX/debug-loc-offset.ll | 4 | ||||
-rw-r--r-- | llvm/test/DebugInfo/X86/no-public-sections.ll | 31 | ||||
-rw-r--r-- | llvm/test/DebugInfo/X86/sections_as_references.ll | 6 |
9 files changed, 10 insertions, 53 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp index a74a9f9fccd..fc08d14d2f6 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp @@ -891,8 +891,8 @@ bool DwarfCompileUnit::hasDwarfPubSections() const { case DICompileUnit::DebugNameTableKind::GNU: return true; case DICompileUnit::DebugNameTableKind::Default: - return DD->tuneForGDB() && DD->usePubSections() && - !includeMinimalInlineScopes() && !CUNode->isDebugDirectivesOnly(); + return DD->tuneForGDB() && !includeMinimalInlineScopes() && + !CUNode->isDebugDirectivesOnly(); } } diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 435190669a4..86ad2e2dbdd 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -130,11 +130,6 @@ DwarfInlinedStrings("dwarf-inlined-strings", cl::Hidden, cl::init(Default)); static cl::opt<bool> - NoDwarfPubSections("no-dwarf-pub-sections", cl::Hidden, - cl::desc("Disable emission of DWARF pub sections."), - cl::init(false)); - -static cl::opt<bool> NoDwarfRangesSection("no-dwarf-ranges-section", cl::Hidden, cl::desc("Disable emission .debug_ranges section."), cl::init(false)); @@ -355,7 +350,6 @@ DwarfDebug::DwarfDebug(AsmPrinter *A, Module *M) DwarfVersion = TT.isNVPTX() ? 2 : (DwarfVersion ? DwarfVersion : dwarf::DWARF_VERSION); - UsePubSections = !NoDwarfPubSections && !TT.isNVPTX(); UseRangesSection = !NoDwarfRangesSection && !TT.isNVPTX(); // Use sections as references. Force for NVPTX. diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h index 750bbc644d1..bfc9b5e56d0 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h @@ -266,9 +266,6 @@ class DwarfDebug : public DebugHandlerBase { /// Use inlined strings. bool UseInlineStrings = false; - /// Whether to emit DWARF pub sections or not. - bool UsePubSections = true; - /// Allow emission of .debug_ranges section. bool UseRangesSection = true; @@ -543,9 +540,6 @@ public: /// Returns whether to use inline strings. bool useInlineStrings() const { return UseInlineStrings; } - /// Returns whether GNU pub sections should be emitted. - bool usePubSections() const { return UsePubSections; } - /// Returns whether ranges section should be emitted. bool useRangesSection() const { return UseRangesSection; } diff --git a/llvm/test/DebugInfo/NVPTX/cu-range-hole.ll b/llvm/test/DebugInfo/NVPTX/cu-range-hole.ll index a1f1b214400..01d038477c0 100644 --- a/llvm/test/DebugInfo/NVPTX/cu-range-hole.ll +++ b/llvm/test/DebugInfo/NVPTX/cu-range-hole.ll @@ -280,7 +280,7 @@ attributes #1 = { nounwind readnone } !llvm.module.flags = !{!11, !12} !0 = !{!"clang version 3.5.0 (trunk 204164) (llvm/trunk 204183)"} -!1 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 (trunk 204164) (llvm/trunk 204183)", isOptimized: false, emissionKind: FullDebug, file: !2, enums: !3, retainedTypes: !3, globals: !3, imports: !3) +!1 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 (trunk 204164) (llvm/trunk 204183)", isOptimized: false, emissionKind: FullDebug, file: !2, enums: !3, retainedTypes: !3, globals: !3, imports: !3, nameTableKind: None) !2 = !DIFile(filename: "b.c", directory: "/source") !3 = !{} !5 = distinct !DISubprogram(name: "b", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !1, scopeLine: 1, file: !2, scope: !6, type: !7, retainedNodes: !3) diff --git a/llvm/test/DebugInfo/NVPTX/dbg-declare-alloca.ll b/llvm/test/DebugInfo/NVPTX/dbg-declare-alloca.ll index 2f8d6606635..8a6fddddd88 100644 --- a/llvm/test/DebugInfo/NVPTX/dbg-declare-alloca.ll +++ b/llvm/test/DebugInfo/NVPTX/dbg-declare-alloca.ll @@ -237,7 +237,7 @@ attributes #1 = { nounwind readnone speculatable } !llvm.module.flags = !{!3, !4, !5} !llvm.ident = !{!6} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, nameTableKind: None) !1 = !DIFile(filename: "t.c", directory: "test") !2 = !{} !3 = !{i32 2, !"Dwarf Version", i32 2} diff --git a/llvm/test/DebugInfo/NVPTX/debug-info.ll b/llvm/test/DebugInfo/NVPTX/debug-info.ll index fcc6343000a..d5dee4055f0 100644 --- a/llvm/test/DebugInfo/NVPTX/debug-info.ll +++ b/llvm/test/DebugInfo/NVPTX/debug-info.ll @@ -8420,7 +8420,7 @@ attributes #3 = { nounwind } !nvvm.internalize.after.link = !{} !nvvmir.version = !{!565} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, imports: !3) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, imports: !3, nameTableKind: None) !1 = !DIFile(filename: "debug-info.cu", directory: "/some/directory") !2 = !{} !3 = !{!4, !11, !16, !18, !20, !22, !24, !28, !30, !32, !34, !36, !38, !40, !42, !44, !46, !48, !50, !52, !54, !56, !60, !62, !64, !66, !71, !76, !78, !80, !85, !89, !91, !93, !95, !97, !99, !101, !103, !105, !110, !114, !116, !118, !122, !124, !126, !128, !130, !132, !136, !138, !140, !145, !153, !157, !159, !161, !163, !165, !169, !171, !173, !177, !179, !181, !183, !185, !187, !189, !191, !193, !195, !201, !203, !205, !209, !211, !213, !215, !217, !219, !221, !223, !227, !231, !233, !235, !240, !242, !244, !246, !248, !250, !252, !257, !263, !267, !271, !276, !279, !283, !287, !302, !306, !310, !314, !318, !323, !325, !329, !333, !337, !345, !349, !353, !357, !361, !366, !372, !376, !380, !382, !390, !394, !401, !403, !405, !409, !413, !417, !422, !426, !431, !432, !433, !434, !436, !437, !438, !439, !440, !441, !442, !446, !448, !450, !452, !454, !456, !458, !460, !463, !465, !467, !469, !471, !473, !475, !477, !479, !481, !483, !485, !487, !489, !491, !493, !495, !497, !499, !501, !503, !505, !507, !509, !511, !513, !515, !517, !519, !521, !523, !525, !527, !529, !531, !533, !535, !537, !539, !541, !543, !545, !547, !549, !551, !553} diff --git a/llvm/test/DebugInfo/NVPTX/debug-loc-offset.ll b/llvm/test/DebugInfo/NVPTX/debug-loc-offset.ll index e836f9662e5..53c5fd9dff1 100644 --- a/llvm/test/DebugInfo/NVPTX/debug-loc-offset.ll +++ b/llvm/test/DebugInfo/NVPTX/debug-loc-offset.ll @@ -93,7 +93,7 @@ attributes #2 = { "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "n !llvm.module.flags = !{!18, !19} !llvm.ident = !{!20, !20} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 (210479)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 (210479)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2, nameTableKind: None) !1 = !DIFile(filename: "debug-loc-offset1.cc", directory: "/llvm_cmake_gcc") !2 = !{} !4 = distinct !DISubprogram(name: "bar", linkageName: "_Z3bari", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 1, file: !1, scope: !5, type: !6, retainedNodes: !2) @@ -101,7 +101,7 @@ attributes #2 = { "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "n !6 = !DISubroutineType(types: !7) !7 = !{!8, !8} !8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!9 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 (210479)", isOptimized: false, emissionKind: FullDebug, file: !10, enums: !2, retainedTypes: !11, globals: !2, imports: !2) +!9 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 (210479)", isOptimized: false, emissionKind: FullDebug, file: !10, enums: !2, retainedTypes: !11, globals: !2, imports: !2, nameTableKind: None) !10 = !DIFile(filename: "debug-loc-offset2.cc", directory: "/llvm_cmake_gcc") !11 = !{!12} !12 = !DICompositeType(tag: DW_TAG_structure_type, name: "A", line: 1, flags: DIFlagFwdDecl, file: !10, identifier: "_ZTS1A") diff --git a/llvm/test/DebugInfo/X86/no-public-sections.ll b/llvm/test/DebugInfo/X86/no-public-sections.ll deleted file mode 100644 index 5100e2f25de..00000000000 --- a/llvm/test/DebugInfo/X86/no-public-sections.ll +++ /dev/null @@ -1,31 +0,0 @@ -; RUN: llc -mtriple=x86_64-pc-linux-gnu -debugger-tune=gdb -filetype=asm < %s -no-dwarf-pub-sections | FileCheck %s --check-prefix=DISABLED -; RUN: llc -mtriple=x86_64-pc-linux-gnu -debugger-tune=gdb -filetype=asm < %s | FileCheck %s - -; DISABLED-NOT: {{.debug_pubnames|.debug_pubtypes}} -; CHECK-DAG: .section .debug_pubnames -; CHECK-DAG: .section .debug_pubtypes - -%struct.bar = type { %"struct.ns::foo" } -%"struct.ns::foo" = type { i8 } - -@b = global %struct.bar zeroinitializer, align 1, !dbg !0 - -!llvm.dbg.cu = !{!2} -!llvm.module.flags = !{!11, !12} -!llvm.ident = !{!13} - -!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) -!1 = distinct !DIGlobalVariable(name: "b", scope: !2, file: !3, line: 8, type: !6, isLocal: false, isDefinition: true) -!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "clang", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5, nameTableKind: Default) -!3 = !DIFile(filename: "type.cpp", directory: "/tmp/dbginfo") -!4 = !{} -!5 = !{!0} -!6 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "bar", file: !3, line: 5, size: 8, elements: !7, identifier: "_ZTS3bar") -!7 = !{!8} -!8 = !DIDerivedType(tag: DW_TAG_member, name: "f", scope: !6, file: !3, line: 6, baseType: !9, size: 8) -!9 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "foo", scope: !10, file: !3, line: 2, size: 8, elements: !4, identifier: "_ZTSN2ns3fooE") -!10 = !DINamespace(name: "ns", scope: null) -!11 = !{i32 2, !"Dwarf Version", i32 4} -!12 = !{i32 2, !"Debug Info Version", i32 3} -!13 = !{!"clang"} - diff --git a/llvm/test/DebugInfo/X86/sections_as_references.ll b/llvm/test/DebugInfo/X86/sections_as_references.ll index dad2971d87e..0268b506003 100644 --- a/llvm/test/DebugInfo/X86/sections_as_references.ll +++ b/llvm/test/DebugInfo/X86/sections_as_references.ll @@ -1,4 +1,4 @@ -; RUN: llc -filetype=asm -O0 -mtriple=x86_64-linux-gnu < %s -dwarf-sections-as-references=Enable -dwarf-inlined-strings=Enable -no-dwarf-pub-sections -no-dwarf-ranges-section -dwarf-version 2 -debugger-tune=gdb | FileCheck %s +; RUN: llc -filetype=asm -O0 -mtriple=x86_64-linux-gnu < %s -dwarf-sections-as-references=Enable -dwarf-inlined-strings=Enable -no-dwarf-ranges-section -dwarf-version 2 -debugger-tune=gdb | FileCheck %s ; CHECK: .file @@ -44,10 +44,10 @@ source_filename = "test/DebugInfo/X86/sections_as_references.ll" !6 = !DIGlobalVariableExpression(var: !7, expr: !DIExpression()) !7 = !DIGlobalVariable(name: "g", scope: null, file: !8, line: 2, type: !3, isLocal: false, isDefinition: true) !8 = !DIFile(filename: "tu2.cpp", directory: "/dir") -!9 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !2, producer: "clang", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !5, retainedTypes: !10, globals: !11, imports: !5) +!9 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !2, producer: "clang", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !5, retainedTypes: !10, globals: !11, imports: !5, nameTableKind: None) !10 = !{!3} !11 = !{!0} -!12 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !8, producer: "clang", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !5, retainedTypes: !10, globals: !13, imports: !5) +!12 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !8, producer: "clang", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !5, retainedTypes: !10, globals: !13, imports: !5, nameTableKind: None) !13 = !{!6} !14 = !{i32 2, !"Dwarf Version", i32 2} !15 = !{i32 1, !"Debug Info Version", i32 3} |