mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-19 04:32:19 +00:00
bf2040f00c
Remove the fake `DW_TAG_auto_variable` and `DW_TAG_arg_variable` tags, using `DW_TAG_variable` in their place Stop exposing the `tag:` field at all in the assembly format for `DILocalVariable`. Most of the testcase updates were generated by the following sed script: find test/ -name "*.ll" -o -name "*.mir" | xargs grep -l 'DILocalVariable' | xargs sed -i '' \ -e 's/tag: DW_TAG_arg_variable, //' \ -e 's/tag: DW_TAG_auto_variable, //' There were only a handful of tests in `test/Assembly` that I needed to update by hand. (Note: a follow-up could change `DILocalVariable::DILocalVariable()` to set the tag to `DW_TAG_formal_parameter` instead of `DW_TAG_variable` (as appropriate), instead of having that logic magically in the backend in `DbgVariable`. I've added a FIXME to that effect.) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243774 91177308-0d34-0410-b5e6-96231b3b80d8
52 lines
2.4 KiB
LLVM
52 lines
2.4 KiB
LLVM
; RUN: llc -mtriple=x86_64-linux-gnu %s -filetype=obj -o %t
|
|
; RUN: llvm-dwarfdump %t | FileCheck %s
|
|
|
|
; Reconstruct this via clang and -O2.
|
|
; static void foo() {
|
|
; struct X { int a; int b; } xyz;
|
|
; }
|
|
|
|
; int bar() {
|
|
; foo();
|
|
; return 1;
|
|
; }
|
|
|
|
; Check that we still have the structure type for X even though we're not
|
|
; going to emit a low/high_pc for foo.
|
|
; CHECK: DW_TAG_structure_type
|
|
|
|
; Function Attrs: nounwind readnone uwtable
|
|
define i32 @bar() #0 {
|
|
entry:
|
|
ret i32 1, !dbg !21
|
|
}
|
|
|
|
attributes #0 = { nounwind readnone uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
|
|
|
|
!llvm.dbg.cu = !{!0}
|
|
!llvm.module.flags = !{!18, !19}
|
|
!llvm.ident = !{!20}
|
|
|
|
!0 = !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 (trunk 209255) (llvm/trunk 209253)", isOptimized: true, emissionKind: 1, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2)
|
|
!1 = !DIFile(filename: "debug-dead-local-var.c", directory: "/usr/local/google/home/echristo")
|
|
!2 = !{}
|
|
!3 = !{!4, !9}
|
|
!4 = !DISubprogram(name: "bar", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, scopeLine: 11, file: !1, scope: !5, type: !6, function: i32 ()* @bar, variables: !2)
|
|
!5 = !DIFile(filename: "debug-dead-local-var.c", directory: "/usr/local/google/home/echristo")
|
|
!6 = !DISubroutineType(types: !7)
|
|
!7 = !{!8}
|
|
!8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
|
|
!9 = !DISubprogram(name: "foo", line: 6, isLocal: true, isDefinition: true, virtualIndex: 6, isOptimized: true, scopeLine: 6, file: !1, scope: !5, type: !10, variables: !12)
|
|
!10 = !DISubroutineType(types: !11)
|
|
!11 = !{null}
|
|
!12 = !{!13}
|
|
!13 = !DILocalVariable(name: "xyz", line: 8, scope: !9, file: !5, type: !14)
|
|
!14 = !DICompositeType(tag: DW_TAG_structure_type, name: "X", line: 8, size: 64, align: 32, file: !1, scope: !9, elements: !15)
|
|
!15 = !{!16, !17}
|
|
!16 = !DIDerivedType(tag: DW_TAG_member, name: "a", line: 8, size: 32, align: 32, file: !1, scope: !14, baseType: !8)
|
|
!17 = !DIDerivedType(tag: DW_TAG_member, name: "b", line: 8, size: 32, align: 32, offset: 32, file: !1, scope: !14, baseType: !8)
|
|
!18 = !{i32 2, !"Dwarf Version", i32 4}
|
|
!19 = !{i32 2, !"Debug Info Version", i32 3}
|
|
!20 = !{!"clang version 3.5.0 (trunk 209255) (llvm/trunk 209253)"}
|
|
!21 = !DILocation(line: 13, scope: !4)
|