Skip to content

Commit

Permalink
DI/Verifier: Fix argument bitrot in DILocalVariable
Browse files Browse the repository at this point in the history
Add a verifier check that `DILocalVariable`s of tag
`DW_TAG_arg_variable` always have a non-zero 'arg:' field, and those of
tag `DW_TAG_auto_variable` always have a zero 'arg:' field.  These are
the only configurations that are properly understood by the backend.

(Also, fix the bad examples in LangRef and test/Assembler, and fix the
bug in Kaleidoscope Ch8.)

A large number of testcases seem to have bitrotted their way forward
from some ancient version of the debug info hierarchy that didn't have
`arg:` parameters.  If you have out-of-tree testcases that start failing
in the verifier and you don't care enough to get the `arg:` right, you
may have some luck just calling:

    sed -e 's/, arg: 0/, arg: 1/'

or some such, but I hand-updated the ones in tree.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243183 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
dexonsmith committed Jul 24, 2015
1 parent 3a8b87d commit cbfbb3e
Show file tree
Hide file tree
Showing 45 changed files with 98 additions and 95 deletions.
6 changes: 3 additions & 3 deletions docs/LangRef.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3906,12 +3906,12 @@ specifies the argument position, and this variable will be included in the

.. code-block:: llvm
!0 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "this", arg: 0,
!0 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "this", arg: 1,
scope: !3, file: !2, line: 7, type: !3,
flags: DIFlagArtificial)
!1 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "x", arg: 1,
!1 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "x", arg: 2,
scope: !4, file: !2, line: 7, type: !3)
!1 = !DILocalVariable(tag: DW_TAG_auto_variable, name: "y",
!2 = !DILocalVariable(tag: DW_TAG_auto_variable, name: "y",
scope: !5, file: !2, line: 7, type: !3)
DIExpression
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorial/LangImpl8.rst
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ argument allocas in ``PrototypeAST::CreateArgumentAllocas``.
KSDbgInfo.TheCU.getDirectory());
DILocalVariable D = DBuilder->createLocalVariable(
dwarf::DW_TAG_arg_variable, Scope, Args[Idx], Unit, Line,
KSDbgInfo.getDoubleTy(), Idx);
KSDbgInfo.getDoubleTy(), true, 0, Idx + 1);
Instruction *Call = DBuilder->insertDeclare(
Alloca, D, DBuilder->createExpression(), Builder.GetInsertBlock());
Expand Down
2 changes: 1 addition & 1 deletion examples/Kaleidoscope/Chapter8/toy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1255,7 +1255,7 @@ void PrototypeAST::CreateArgumentAllocas(Function *F) {
KSDbgInfo.TheCU->getDirectory());
DILocalVariable *D = DBuilder->createLocalVariable(
dwarf::DW_TAG_arg_variable, Scope, Args[Idx], Unit, Line,
KSDbgInfo.getDoubleTy(), Idx);
KSDbgInfo.getDoubleTy(), true, 0, Idx + 1);

DBuilder->insertDeclare(Alloca, D, DBuilder->createExpression(),
DebugLoc::get(Line, 0, Scope),
Expand Down
2 changes: 2 additions & 0 deletions lib/IR/Verifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1063,6 +1063,8 @@ void Verifier::visitDILocalVariable(const DILocalVariable &N) {
"invalid tag", &N);
Assert(N.getRawScope() && isa<DILocalScope>(N.getRawScope()),
"local variable requires a valid scope", &N, N.getRawScope());
Assert(bool(N.getArg()) == (N.getTag() == dwarf::DW_TAG_arg_variable),
"local variable should have arg iff it's a DW_TAG_arg_variable", &N);
}

void Verifier::visitDIExpression(const DIExpression &N) {
Expand Down
4 changes: 2 additions & 2 deletions test/Assembler/dilocalvariable.ll
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
!6 = !DILocalVariable(tag: DW_TAG_auto_variable, name: "foo", scope: !0,
file: !2, line: 7, type: !3, flags: DIFlagArtificial)

; CHECK: !7 = !DILocalVariable(tag: DW_TAG_arg_variable, arg: 0, scope: !0)
; CHECK: !7 = !DILocalVariable(tag: DW_TAG_arg_variable, arg: 1, scope: !0)
; CHECK: !8 = !DILocalVariable(tag: DW_TAG_auto_variable, scope: !0)
!7 = !DILocalVariable(tag: DW_TAG_arg_variable, scope: !0)
!7 = !DILocalVariable(tag: DW_TAG_arg_variable, scope: !0, arg: 1)
!8 = !DILocalVariable(tag: DW_TAG_auto_variable, scope: !0)
5 changes: 3 additions & 2 deletions test/Assembler/invalid-dilocalvariable-arg-negative.ll
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
; RUN: not llvm-as < %s 2>&1 | FileCheck %s

!0 = !DILocalVariable(tag: DW_TAG_arg_variable, scope: !{}, arg: 0)
!0 = !DILocalVariable(tag: DW_TAG_arg_variable, scope: !{}, arg: 1)
!1 = !DILocalVariable(tag: DW_TAG_auto_variable, scope: !{}, arg: 0)

; CHECK: <stdin>:[[@LINE+1]]:66: error: expected unsigned integer
!1 = !DILocalVariable(tag: DW_TAG_arg_variable, scope: !{}, arg: -1)
!2 = !DILocalVariable(tag: DW_TAG_arg_variable, scope: !{}, arg: -1)
2 changes: 1 addition & 1 deletion test/CodeGen/ARM/2010-04-15-ScavengerDebugValue.ll
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnon

!llvm.dbg.cu = !{!3}
!llvm.module.flags = !{!15}
!0 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "b", line: 93, arg: 0, scope: !1, file: !2, type: !6)
!0 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "b", line: 93, arg: 2, scope: !1, file: !2, type: !6)
!1 = !DISubprogram(name: "__addvsi3", linkageName: "__addvsi3", line: 94, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !12, scope: null, type: !4)
!2 = !DIFile(filename: "libgcc2.c", directory: "/Users/bwilson/local/nightly/test-2010-04-14/build/llvmgcc.roots/llvmgcc~obj/src/gcc")
!12 = !DIFile(filename: "libgcc2.c", directory: "/Users/bwilson/local/nightly/test-2010-04-14/build/llvmgcc.roots/llvmgcc~obj/src/gcc")
Expand Down
4 changes: 2 additions & 2 deletions test/CodeGen/ARM/2010-06-25-Thumb2ITInvalidIterator.ll
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnon
!llvm.dbg.lv.fn = !{!0, !8, !10, !12}
!llvm.dbg.gv = !{!14}

!0 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "buf", line: 4, arg: 0, scope: !1, file: !2, type: !6)
!0 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "buf", line: 4, arg: 1, scope: !1, file: !2, type: !6)
!1 = !DISubprogram(name: "x0", linkageName: "x0", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !26, scope: null, type: !4)
!2 = !DIFile(filename: "t.c", directory: "/private/tmp")
!3 = !DICompileUnit(language: DW_LANG_C99, producer: "clang 2.0", isOptimized: true, file: !26)
!4 = !DISubroutineType(types: !5)
!5 = !{null}
!6 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 32, align: 32, file: !26, scope: !2, baseType: !7)
!7 = !DIBasicType(tag: DW_TAG_base_type, name: "unsigned char", size: 8, align: 8, encoding: DW_ATE_unsigned_char)
!8 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "nbytes", line: 4, arg: 0, scope: !1, file: !2, type: !9)
!8 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "nbytes", line: 4, arg: 2, scope: !1, file: !2, type: !9)
!9 = !DIBasicType(tag: DW_TAG_base_type, name: "unsigned long", size: 32, align: 32, encoding: DW_ATE_unsigned)
!10 = !DILocalVariable(tag: DW_TAG_auto_variable, name: "nread", line: 6, scope: !11, file: !2, type: !9)
!11 = distinct !DILexicalBlock(line: 5, column: 1, file: !26, scope: !1)
Expand Down
6 changes: 3 additions & 3 deletions test/CodeGen/ARM/2010-08-04-StackVariable.ll
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,15 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnon
!20 = !DISubprogram(name: "main", linkageName: "main", line: 23, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !48, scope: !2, type: !21, function: i32 ()* @main)
!21 = !DISubroutineType(types: !22)
!22 = !{!13}
!23 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "i", line: 16, arg: 0, scope: !17, file: !2, type: !13)
!23 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "i", line: 16, arg: 1, scope: !17, file: !2, type: !13)
!24 = !DILocation(line: 16, scope: !17)
!25 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "location", line: 16, arg: 0, scope: !17, file: !2, type: !26)
!25 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "location", line: 16, arg: 2, scope: !17, file: !2, type: !26)
!26 = !DIDerivedType(tag: DW_TAG_reference_type, name: "SVal", size: 64, align: 64, file: !48, scope: !2, baseType: !1)
!27 = !DILocation(line: 17, scope: !28)
!28 = distinct !DILexicalBlock(line: 16, column: 0, file: !2, scope: !17)
!29 = !DILocation(line: 18, scope: !28)
!30 = !DILocation(line: 20, scope: !28)
!31 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "this", line: 11, arg: 0, scope: !16, file: !2, type: !32)
!31 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "this", line: 11, arg: 1, scope: !16, file: !2, type: !32)
!32 = !DIDerivedType(tag: DW_TAG_const_type, size: 64, align: 64, flags: DIFlagArtificial, file: !48, scope: !2, baseType: !33)
!33 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, file: !48, scope: !2, baseType: !1)
!34 = !DILocation(line: 11, scope: !16)
Expand Down
10 changes: 5 additions & 5 deletions test/CodeGen/ARM/2011-01-19-MergedGlobalDbg.ll
Original file line number Diff line number Diff line change
Expand Up @@ -88,24 +88,24 @@ entry:
!7 = !DISubprogram(name: "get3", linkageName: "get3", line: 10, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 10, file: !47, scope: !1, type: !3, function: i8 (i8)* @get3, variables: !44)
!8 = !DISubprogram(name: "get4", linkageName: "get4", line: 13, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 13, file: !47, scope: !1, type: !3, function: i8 (i8)* @get4, variables: !45)
!9 = !DISubprogram(name: "get5", linkageName: "get5", line: 16, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 16, file: !47, scope: !1, type: !3, function: i8 (i8)* @get5, variables: !46)
!10 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "a", line: 4, arg: 0, scope: !0, file: !1, type: !5)
!10 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "a", line: 4, arg: 1, scope: !0, file: !1, type: !5)
!11 = !DILocalVariable(tag: DW_TAG_auto_variable, name: "b", line: 4, scope: !12, file: !1, type: !5)
!12 = distinct !DILexicalBlock(line: 4, column: 0, file: !47, scope: !0)
!13 = !DIGlobalVariable(name: "x1", line: 3, isLocal: true, isDefinition: true, scope: !1, file: !1, type: !5, variable: i8* @x1)
!14 = !DIGlobalVariable(name: "x2", line: 6, isLocal: true, isDefinition: true, scope: !1, file: !1, type: !5, variable: i8* @x2)
!15 = !DIGlobalVariable(name: "x3", line: 9, isLocal: true, isDefinition: true, scope: !1, file: !1, type: !5, variable: i8* @x3)
!16 = !DIGlobalVariable(name: "x4", line: 12, isLocal: true, isDefinition: true, scope: !1, file: !1, type: !5, variable: i8* @x4)
!17 = !DIGlobalVariable(name: "x5", line: 15, isLocal: false, isDefinition: true, scope: !1, file: !1, type: !5, variable: i8* @x5)
!18 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "a", line: 7, arg: 0, scope: !6, file: !1, type: !5)
!18 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "a", line: 7, arg: 1, scope: !6, file: !1, type: !5)
!19 = !DILocalVariable(tag: DW_TAG_auto_variable, name: "b", line: 7, scope: !20, file: !1, type: !5)
!20 = distinct !DILexicalBlock(line: 7, column: 0, file: !47, scope: !6)
!21 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "a", line: 10, arg: 0, scope: !7, file: !1, type: !5)
!21 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "a", line: 10, arg: 1, scope: !7, file: !1, type: !5)
!22 = !DILocalVariable(tag: DW_TAG_auto_variable, name: "b", line: 10, scope: !23, file: !1, type: !5)
!23 = distinct !DILexicalBlock(line: 10, column: 0, file: !47, scope: !7)
!24 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "a", line: 13, arg: 0, scope: !8, file: !1, type: !5)
!24 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "a", line: 13, arg: 1, scope: !8, file: !1, type: !5)
!25 = !DILocalVariable(tag: DW_TAG_auto_variable, name: "b", line: 13, scope: !26, file: !1, type: !5)
!26 = distinct !DILexicalBlock(line: 13, column: 0, file: !47, scope: !8)
!27 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "a", line: 16, arg: 0, scope: !9, file: !1, type: !5)
!27 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "a", line: 16, arg: 1, scope: !9, file: !1, type: !5)
!28 = !DILocalVariable(tag: DW_TAG_auto_variable, name: "b", line: 16, scope: !29, file: !1, type: !5)
!29 = distinct !DILexicalBlock(line: 16, column: 0, file: !47, scope: !9)
!30 = !DILocation(line: 4, scope: !0)
Expand Down
4 changes: 2 additions & 2 deletions test/CodeGen/ARM/debug-info-d16-reg.ll
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ declare i32 @puts(i8* nocapture) nounwind
!50 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "val", line: 4, arg: 2, scope: !9, file: !1, type: !7)
!51 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "c", line: 4, arg: 2, scope: !9, file: !1, type: !8)

!22 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "argc", line: 17, arg: 0, scope: !10, file: !1, type: !5)
!23 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "argv", line: 17, arg: 0, scope: !10, file: !1, type: !13)
!22 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "argc", line: 17, arg: 1, scope: !10, file: !1, type: !5)
!23 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "argv", line: 17, arg: 2, scope: !10, file: !1, type: !13)
!24 = !DILocalVariable(tag: DW_TAG_auto_variable, name: "dval", line: 19, scope: !25, file: !1, type: !7)
!25 = distinct !DILexicalBlock(line: 18, column: 0, file: !46, scope: !10)
!26 = !DILocation(line: 4, scope: !9)
Expand Down
2 changes: 1 addition & 1 deletion test/CodeGen/Generic/dbg_value.ll
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ define void @t(%0*, i32, i32, i32, i32) nounwind {
declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnone

; !0 should conform to the format of DIVariable.
!0 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "a", arg: 0, scope: !DISubprogram())
!0 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "a", arg: 1, scope: !DISubprogram())
2 changes: 1 addition & 1 deletion test/CodeGen/X86/2009-02-12-DebugInfoVLA.ll
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ declare i64 @strlen(i8*) nounwind readonly

declare void @llvm.stackrestore(i8*) nounwind

!0 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "s1", line: 2, arg: 0, scope: !1, file: !2, type: !6)
!0 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "s1", line: 2, arg: 1, scope: !1, file: !2, type: !6)
!1 = !DISubprogram(name: "foo", linkageName: "foo", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scope: !2, type: !3)
!2 = !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: true, emissionKind: 0, file: !17, enums: !18, retainedTypes: !18)
!3 = !DISubroutineType(types: !4)
Expand Down
2 changes: 1 addition & 1 deletion test/CodeGen/X86/2010-01-18-DbgValue.ll
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone
!llvm.dbg.cu = !{!3}
!llvm.module.flags = !{!21}

!0 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "my_r0", line: 11, arg: 0, scope: !1, file: !2, type: !7)
!0 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "my_r0", line: 11, arg: 1, scope: !1, file: !2, type: !7)
!1 = !DISubprogram(name: "foo", linkageName: "foo", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 11, file: !19, scope: !2, type: !4, function: double (%struct.Rect*)* @foo)
!2 = !DIFile(filename: "b2.c", directory: "/tmp/")
!3 = !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: false, emissionKind: 0, file: !19, enums: !20, retainedTypes: !20, subprograms: !18)
Expand Down
8 changes: 4 additions & 4 deletions test/CodeGen/X86/2010-05-25-DotDebugLoc.ll
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnon
!llvm.dbg.cu = !{!3}
!llvm.module.flags = !{!48}

!0 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "a", line: 1921, arg: 0, scope: !1, file: !2, type: !9)
!0 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "a", line: 1921, arg: 1, scope: !1, file: !2, type: !9)
!1 = !DISubprogram(name: "__divsc3", linkageName: "__divsc3", line: 1922, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, scopeLine: 1922, file: !45, scope: !2, type: !4, function: %0 (float, float, float, float)* @__divsc3, variables: !43)
!2 = !DIFile(filename: "libgcc2.c", directory: "/Users/yash/clean/LG.D/gcc/../../llvmgcc/gcc")
!3 = !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: true, emissionKind: 1, file: !45, enums: !47, retainedTypes: !47, subprograms: !44, imports: null)
Expand All @@ -210,9 +210,9 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnon
!8 = !DIBasicType(tag: DW_TAG_base_type, name: "complex float", size: 64, align: 32, encoding: DW_ATE_complex_float)
!9 = !DIDerivedType(tag: DW_TAG_typedef, name: "SFtype", line: 167, file: !46, scope: !7, baseType: !10)
!10 = !DIBasicType(tag: DW_TAG_base_type, name: "float", size: 32, align: 32, encoding: DW_ATE_float)
!11 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "b", line: 1921, arg: 0, scope: !1, file: !2, type: !9)
!12 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "c", line: 1921, arg: 0, scope: !1, file: !2, type: !9)
!13 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "d", line: 1921, arg: 0, scope: !1, file: !2, type: !9)
!11 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "b", line: 1921, arg: 2, scope: !1, file: !2, type: !9)
!12 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "c", line: 1921, arg: 3, scope: !1, file: !2, type: !9)
!13 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "d", line: 1921, arg: 4, scope: !1, file: !2, type: !9)
!14 = !DILocalVariable(tag: DW_TAG_auto_variable, name: "denom", line: 1923, scope: !15, file: !2, type: !9)
!15 = distinct !DILexicalBlock(line: 1922, column: 0, file: !45, scope: !1)
!16 = !DILocalVariable(tag: DW_TAG_auto_variable, name: "ratio", line: 1923, scope: !15, file: !2, type: !9)
Expand Down
8 changes: 4 additions & 4 deletions test/CodeGen/X86/2010-05-26-DotDebugLoc.ll
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnon
!1 = !DIFile(filename: "foo.c", directory: "/tmp/")
!2 = !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: true, emissionKind: 1, file: !36, enums: !37, retainedTypes: !37, subprograms: !32, globals: !31, imports: !37)
!3 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
!4 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "x", line: 12, arg: 0, scope: !5, file: !1, type: !3)
!4 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "x", line: 12, arg: 1, scope: !5, file: !1, type: !3)
!5 = !DISubprogram(name: "foo", linkageName: "foo", line: 13, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, scopeLine: 13, file: !36, scope: !1, type: !6, function: void (i32)* @foo, variables: !33)
!6 = !DISubroutineType(types: !7)
!7 = !{null, !3}
!8 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "myvar", line: 17, arg: 0, scope: !9, file: !1, type: !13)
!8 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "myvar", line: 17, arg: 1, scope: !9, file: !1, type: !13)
!9 = !DISubprogram(name: "bar", linkageName: "bar", line: 17, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, scopeLine: 17, file: !36, scope: !1, type: !10, function: i8* (%struct.a*)* @bar, variables: !34)
!10 = !DISubroutineType(types: !11)
!11 = !{!12, !13}
Expand All @@ -42,14 +42,14 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnon
!15 = !{!16, !17}
!16 = !DIDerivedType(tag: DW_TAG_member, name: "c", line: 3, size: 32, align: 32, file: !36, scope: !14, baseType: !3)
!17 = !DIDerivedType(tag: DW_TAG_member, name: "d", line: 4, size: 64, align: 64, offset: 64, file: !36, scope: !14, baseType: !13)
!18 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "argc", line: 22, arg: 0, scope: !19, file: !1, type: !3)
!18 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "argc", line: 22, arg: 1, scope: !19, file: !1, type: !3)
!19 = !DISubprogram(name: "main", linkageName: "main", line: 22, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, scopeLine: 22, file: !36, scope: !1, type: !20, variables: !35)
!20 = !DISubroutineType(types: !21)
!21 = !{!3, !3, !22}
!22 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, file: !36, scope: !1, baseType: !23)
!23 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, file: !36, scope: !1, baseType: !24)
!24 = !DIBasicType(tag: DW_TAG_base_type, name: "char", size: 8, align: 8, encoding: DW_ATE_signed_char)
!25 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "argv", line: 22, arg: 0, scope: !19, file: !1, type: !22)
!25 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "argv", line: 22, arg: 2, scope: !19, file: !1, type: !22)
!26 = !DILocalVariable(tag: DW_TAG_auto_variable, name: "e", line: 23, scope: !27, file: !1, type: !14)
!27 = distinct !DILexicalBlock(line: 22, column: 0, file: !36, scope: !19)
!28 = !DILocation(line: 18, scope: !29)
Expand Down
Loading

0 comments on commit cbfbb3e

Please sign in to comment.