llvm.org GIT mirror llvm / 99cc7e5
DebugInfo: Remove DW_TAG_constant Remove handling for DW_TAG_constant. We started producing it in r110656, but reverted that in r110876 without dropping the support. Finish the job. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228623 91177308-0d34-0410-b5e6-96231b3b80d8 Duncan P. N. Exon Smith 4 years ago
4 changed file(s) with 1 addition(s) and 35 deletion(s). Raw diff Collapse all Expand all
18061806 * DW_TAG_subrange_type
18071807 * DW_TAG_base_type
18081808 * DW_TAG_const_type
1809 * DW_TAG_constant
18101809 * DW_TAG_file_type
18111810 * DW_TAG_namelist
18121811 * DW_TAG_packed_type
15581558 return dwarf::GIEK_TYPE;
15591559 case dwarf::DW_TAG_subprogram:
15601560 return dwarf::PubIndexEntryDescriptor(dwarf::GIEK_FUNCTION, Linkage);
1561 case dwarf::DW_TAG_constant:
15621561 case dwarf::DW_TAG_variable:
15631562 return dwarf::PubIndexEntryDescriptor(dwarf::GIEK_VARIABLE, Linkage);
15641563 case dwarf::DW_TAG_enumerator:
253253 }
254254
255255 bool DIDescriptor::isGlobalVariable() const {
256 return DbgNode && (getTag() == dwarf::DW_TAG_variable ||
257 getTag() == dwarf::DW_TAG_constant);
256 return DbgNode && getTag() == dwarf::DW_TAG_variable;
258257 }
259258
260259 bool DIDescriptor::isScope() const {
+0
-31
test/DebugInfo/X86/2010-08-10-DbgConstant.ll less more
None ; RUN: llc -mtriple=i686-linux -O0 -filetype=obj -o %t %s
1 ; RUN: llvm-dwarfdump -debug-dump=info %t | FileCheck %s
2 ; CHECK: DW_TAG_constant
3 ; CHECK-NEXT: DW_AT_name [DW_FORM_strp] ( .debug_str[0x{{[0-9a-f]*}}] = "ro")
4
5 define void @foo() nounwind ssp {
6 entry:
7 call void @bar(i32 201), !dbg !8
8 ret void, !dbg !8
9 }
10
11 declare void @bar(i32)
12
13 !llvm.dbg.cu = !{!2}
14 !llvm.module.flags = !{!13}
15
16 !0 = !{!"0x2e\00foo\00foo\00foo\003\000\001\000\006\000\000\003", !12, !1, !3, null, void ()* @foo, null, null, null} ; [ DW_TAG_subprogram ]
17 !1 = !{!"0x29", !12} ; [ DW_TAG_file_type ]
18 !2 = !{!"0x11\0012\00clang 2.8\000\00\000\00\000", !12, !4, !4, !10, !11, !14} ; [ DW_TAG_compile_unit ]
19 !3 = !{!"0x15\00\000\000\000\000\000\000", !12, !1, null, !4, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
20 !4 = !{null}
21 !5 = !{!"0x27\00ro\00ro\00ro\001\001\001", !1, !1, !6, i32 201, null} ; [ DW_TAG_constant ]
22 !6 = !{!"0x26\00\000\000\000\000\000", !12, !1, !7} ; [ DW_TAG_const_type ]
23 !7 = !{!"0x24\00unsigned int\000\0032\0032\000\000\007", !12, !1} ; [ DW_TAG_base_type ]
24 !8 = !MDLocation(line: 3, column: 14, scope: !9)
25 !9 = !{!"0xb\003\0012\000", !12, !0} ; [ DW_TAG_lexical_block ]
26 !10 = !{!0}
27 !11 = !{!5}
28 !12 = !{!"/tmp/l.c", !"/Volumes/Lalgate/clean/D"}
29 !13 = !{i32 1, !"Debug Info Version", i32 2}
30 !14 = !{}