From: Duncan P. N. Exon Smith Date: Fri, 24 Jul 2015 23:59:25 +0000 (+0000) Subject: DI/Verifier: Fix argument bitrot in DILocalVariable X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff_plain;h=cbfbb3ee4c9b215cd367db3b64dfef0a7f334369 DI/Verifier: Fix argument bitrot in DILocalVariable 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 --- diff --git a/docs/LangRef.rst b/docs/LangRef.rst index 17ee4b32bc3..c5035984f3b 100644 --- a/docs/LangRef.rst +++ b/docs/LangRef.rst @@ -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 diff --git a/docs/tutorial/LangImpl8.rst b/docs/tutorial/LangImpl8.rst index 0b9b39c84b7..88224bb92f0 100644 --- a/docs/tutorial/LangImpl8.rst +++ b/docs/tutorial/LangImpl8.rst @@ -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()); diff --git a/examples/Kaleidoscope/Chapter8/toy.cpp b/examples/Kaleidoscope/Chapter8/toy.cpp index dbc996d4318..72e5089177b 100644 --- a/examples/Kaleidoscope/Chapter8/toy.cpp +++ b/examples/Kaleidoscope/Chapter8/toy.cpp @@ -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), diff --git a/lib/IR/Verifier.cpp b/lib/IR/Verifier.cpp index 3b041b088f2..12e4f4ed056 100644 --- a/lib/IR/Verifier.cpp +++ b/lib/IR/Verifier.cpp @@ -1063,6 +1063,8 @@ void Verifier::visitDILocalVariable(const DILocalVariable &N) { "invalid tag", &N); Assert(N.getRawScope() && isa(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) { diff --git a/test/Assembler/dilocalvariable.ll b/test/Assembler/dilocalvariable.ll index 312373ca862..affe6105e1c 100644 --- a/test/Assembler/dilocalvariable.ll +++ b/test/Assembler/dilocalvariable.ll @@ -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) diff --git a/test/Assembler/invalid-dilocalvariable-arg-negative.ll b/test/Assembler/invalid-dilocalvariable-arg-negative.ll index 08e370a3666..ff90d66fa11 100644 --- a/test/Assembler/invalid-dilocalvariable-arg-negative.ll +++ b/test/Assembler/invalid-dilocalvariable-arg-negative.ll @@ -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: :[[@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) diff --git a/test/CodeGen/ARM/2010-04-15-ScavengerDebugValue.ll b/test/CodeGen/ARM/2010-04-15-ScavengerDebugValue.ll index 638b26c7314..86e17205fc9 100644 --- a/test/CodeGen/ARM/2010-04-15-ScavengerDebugValue.ll +++ b/test/CodeGen/ARM/2010-04-15-ScavengerDebugValue.ll @@ -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") diff --git a/test/CodeGen/ARM/2010-06-25-Thumb2ITInvalidIterator.ll b/test/CodeGen/ARM/2010-06-25-Thumb2ITInvalidIterator.ll index 95bb2769759..5637d7aa934 100644 --- a/test/CodeGen/ARM/2010-06-25-Thumb2ITInvalidIterator.ll +++ b/test/CodeGen/ARM/2010-06-25-Thumb2ITInvalidIterator.ll @@ -47,7 +47,7 @@ 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) @@ -55,7 +55,7 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnon !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) diff --git a/test/CodeGen/ARM/2010-08-04-StackVariable.ll b/test/CodeGen/ARM/2010-08-04-StackVariable.ll index 953e2bbf291..f59d9a48a30 100644 --- a/test/CodeGen/ARM/2010-08-04-StackVariable.ll +++ b/test/CodeGen/ARM/2010-08-04-StackVariable.ll @@ -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) diff --git a/test/CodeGen/ARM/2011-01-19-MergedGlobalDbg.ll b/test/CodeGen/ARM/2011-01-19-MergedGlobalDbg.ll index 9a5baf21b8f..05fd2832525 100644 --- a/test/CodeGen/ARM/2011-01-19-MergedGlobalDbg.ll +++ b/test/CodeGen/ARM/2011-01-19-MergedGlobalDbg.ll @@ -88,7 +88,7 @@ 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) @@ -96,16 +96,16 @@ entry: !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) diff --git a/test/CodeGen/ARM/debug-info-d16-reg.ll b/test/CodeGen/ARM/debug-info-d16-reg.ll index 27bd3b8639c..b0cf4d10337 100644 --- a/test/CodeGen/ARM/debug-info-d16-reg.ll +++ b/test/CodeGen/ARM/debug-info-d16-reg.ll @@ -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) diff --git a/test/CodeGen/Generic/dbg_value.ll b/test/CodeGen/Generic/dbg_value.ll index 4038086cbb4..9fe4bf33087 100644 --- a/test/CodeGen/Generic/dbg_value.ll +++ b/test/CodeGen/Generic/dbg_value.ll @@ -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()) diff --git a/test/CodeGen/X86/2009-02-12-DebugInfoVLA.ll b/test/CodeGen/X86/2009-02-12-DebugInfoVLA.ll index 6c177e5b5f5..29086d2cce7 100644 --- a/test/CodeGen/X86/2009-02-12-DebugInfoVLA.ll +++ b/test/CodeGen/X86/2009-02-12-DebugInfoVLA.ll @@ -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) diff --git a/test/CodeGen/X86/2010-01-18-DbgValue.ll b/test/CodeGen/X86/2010-01-18-DbgValue.ll index db56ae65d51..a1779433607 100644 --- a/test/CodeGen/X86/2010-01-18-DbgValue.ll +++ b/test/CodeGen/X86/2010-01-18-DbgValue.ll @@ -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) diff --git a/test/CodeGen/X86/2010-05-25-DotDebugLoc.ll b/test/CodeGen/X86/2010-05-25-DotDebugLoc.ll index 3b99e91915f..4e5592f8900 100644 --- a/test/CodeGen/X86/2010-05-25-DotDebugLoc.ll +++ b/test/CodeGen/X86/2010-05-25-DotDebugLoc.ll @@ -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) @@ -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) diff --git a/test/CodeGen/X86/2010-05-26-DotDebugLoc.ll b/test/CodeGen/X86/2010-05-26-DotDebugLoc.ll index 3670c556aa7..a4b94d4b4e2 100644 --- a/test/CodeGen/X86/2010-05-26-DotDebugLoc.ll +++ b/test/CodeGen/X86/2010-05-26-DotDebugLoc.ll @@ -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} @@ -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) diff --git a/test/CodeGen/X86/2010-05-28-Crash.ll b/test/CodeGen/X86/2010-05-28-Crash.ll index c5201614fdd..6a6ee6a19aa 100644 --- a/test/CodeGen/X86/2010-05-28-Crash.ll +++ b/test/CodeGen/X86/2010-05-28-Crash.ll @@ -25,14 +25,14 @@ entry: !llvm.dbg.cu = !{!3} !llvm.module.flags = !{!20} -!0 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "y", line: 2, arg: 0, scope: !1, file: !2, type: !6) +!0 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "y", 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: true, scopeLine: 2, file: !18, scope: !2, type: !4, function: i32 (i32)* @foo, variables: !15) !2 = !DIFile(filename: "f.c", directory: "/tmp") !3 = !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: true, emissionKind: 1, file: !18, enums: !19, retainedTypes: !19, subprograms: !17, imports: null) !4 = !DISubroutineType(types: !5) !5 = !{!6, !6} !6 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!7 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "x", line: 6, arg: 0, scope: !8, file: !2, type: !6) +!7 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "x", line: 6, arg: 1, scope: !8, file: !2, type: !6) !8 = !DISubprogram(name: "bar", linkageName: "bar", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, scopeLine: 6, file: !18, scope: !2, type: !4, function: i32 (i32)* @bar, variables: !16) !9 = !DILocation(line: 3, scope: !10) !10 = distinct !DILexicalBlock(line: 2, column: 0, file: !18, scope: !1) diff --git a/test/CodeGen/X86/2010-06-01-DeadArg-DbgInfo.ll b/test/CodeGen/X86/2010-06-01-DeadArg-DbgInfo.ll index 757c92808e1..be985b8779e 100644 --- a/test/CodeGen/X86/2010-06-01-DeadArg-DbgInfo.ll +++ b/test/CodeGen/X86/2010-06-01-DeadArg-DbgInfo.ll @@ -23,7 +23,7 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnon !llvm.module.flags = !{!34} !llvm.dbg.lv = !{!0, !14, !15, !16, !17, !24, !25, !28} -!0 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "this", line: 11, arg: 0, scope: !1, file: !3, type: !12) +!0 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "this", line: 11, arg: 1, scope: !1, file: !3, type: !12) !1 = !DISubprogram(name: "bar", linkageName: "_ZN3foo3barEi", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, scopeLine: 11, file: !31, scope: !2, type: !9, function: i32 (%struct.foo*, i32)* null) !2 = !DICompositeType(tag: DW_TAG_structure_type, name: "foo", line: 3, size: 32, align: 32, file: !31, scope: !3, elements: !5) !3 = !DIFile(filename: "foo.cp", directory: "/tmp/") @@ -37,17 +37,17 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnon !11 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial, file: !31, scope: !3, baseType: !2) !12 = !DIDerivedType(tag: DW_TAG_const_type, size: 64, align: 64, flags: DIFlagArtificial, file: !31, scope: !3, baseType: !13) !13 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, file: !31, scope: !3, baseType: !2) -!14 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "x", line: 11, arg: 0, scope: !1, file: !3, type: !7) -!15 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "this", line: 15, arg: 0, scope: !8, file: !3, type: !12) -!16 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "x", line: 15, arg: 0, scope: !8, file: !3, type: !7) -!17 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "argc", line: 19, arg: 0, scope: !18, file: !3, type: !7) +!14 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "x", line: 11, arg: 2, scope: !1, file: !3, type: !7) +!15 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "this", line: 15, arg: 1, scope: !8, file: !3, type: !12) +!16 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "x", line: 15, arg: 2, scope: !8, file: !3, type: !7) +!17 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "argc", line: 19, arg: 1, scope: !18, file: !3, type: !7) !18 = !DISubprogram(name: "main", linkageName: "main", line: 19, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, scopeLine: 19, file: !31, scope: !3, type: !19) !19 = !DISubroutineType(types: !20) !20 = !{!7, !7, !21} !21 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, file: !31, scope: !3, baseType: !22) !22 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, file: !31, scope: !3, baseType: !23) !23 = !DIBasicType(tag: DW_TAG_base_type, name: "char", size: 8, align: 8, encoding: DW_ATE_signed_char) -!24 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "argv", line: 19, arg: 0, scope: !18, file: !3, type: !21) +!24 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "argv", line: 19, arg: 2, scope: !18, file: !3, type: !21) !25 = !DILocalVariable(tag: DW_TAG_auto_variable, name: "a", line: 20, scope: !26, file: !3, type: !2) !26 = distinct !DILexicalBlock(line: 19, column: 0, file: !31, scope: !27) !27 = distinct !DILexicalBlock(line: 19, column: 0, file: !31, scope: !18) diff --git a/test/CodeGen/X86/2010-08-04-StackVariable.ll b/test/CodeGen/X86/2010-08-04-StackVariable.ll index 6129e78fd34..e2a2884e842 100644 --- a/test/CodeGen/X86/2010-08-04-StackVariable.ll +++ b/test/CodeGen/X86/2010-08-04-StackVariable.ll @@ -101,15 +101,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, scopeLine: 23, file: !47, 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: !47, scope: !2, baseType: !1) !27 = !DILocation(line: 17, scope: !28) !28 = distinct !DILexicalBlock(line: 16, column: 0, file: !47, 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: !47, scope: !2, baseType: !33) !33 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, file: !47, scope: !2, baseType: !1) !34 = !DILocation(line: 11, scope: !16) diff --git a/test/CodeGen/X86/2010-11-02-DbgParameter.ll b/test/CodeGen/X86/2010-11-02-DbgParameter.ll index 124cc9a430e..cc292ccae04 100644 --- a/test/CodeGen/X86/2010-11-02-DbgParameter.ll +++ b/test/CodeGen/X86/2010-11-02-DbgParameter.ll @@ -24,7 +24,7 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnon !3 = !DISubroutineType(types: !4) !4 = !{!5} !5 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!6 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "i", line: 3, arg: 0, scope: !0, file: !1, type: !7) +!6 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "i", line: 3, arg: 1, scope: !0, file: !1, type: !7) !7 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 32, align: 32, file: !17, scope: !1, baseType: !8) !8 = !DICompositeType(tag: DW_TAG_structure_type, name: "bar", line: 2, size: 64, align: 32, file: !17, scope: !1, elements: !9) !9 = !{!10, !11} diff --git a/test/CodeGen/X86/2011-01-24-DbgValue-Before-Use.ll b/test/CodeGen/X86/2011-01-24-DbgValue-Before-Use.ll index 0ded66fa3bf..c873915da5a 100644 --- a/test/CodeGen/X86/2011-01-24-DbgValue-Before-Use.ll +++ b/test/CodeGen/X86/2011-01-24-DbgValue-Before-Use.ll @@ -88,8 +88,8 @@ declare i32 @puts(i8* nocapture) nounwind !7 = !DISubroutineType(types: !8) !8 = !{!9} !9 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!10 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "a", line: 5, arg: 0, scope: !0, file: !1, type: !5) -!11 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "b", line: 5, arg: 0, scope: !0, file: !1, type: !5) +!10 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "a", line: 5, arg: 1, scope: !0, file: !1, type: !5) +!11 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "b", line: 5, arg: 2, scope: !0, file: !1, type: !5) !12 = !DILocalVariable(tag: DW_TAG_auto_variable, name: "c", line: 6, scope: !13, file: !1, type: !5) !13 = distinct !DILexicalBlock(line: 5, column: 52, file: !31, scope: !0) !14 = !DILocalVariable(tag: DW_TAG_auto_variable, name: "m", line: 26, scope: !15, file: !1, type: !16) diff --git a/test/CodeGen/X86/unknown-location.ll b/test/CodeGen/X86/unknown-location.ll index c018a49d135..1b73e649630 100644 --- a/test/CodeGen/X86/unknown-location.ll +++ b/test/CodeGen/X86/unknown-location.ll @@ -21,7 +21,7 @@ entry: !llvm.dbg.cu = !{!3} !llvm.module.flags = !{!12} -!0 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "x", line: 1, arg: 0, scope: !1, file: !2, type: !6) +!0 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "x", line: 1, arg: 2, scope: !1, file: !2, type: !6) !1 = !DISubprogram(name: "foo", linkageName: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 1, file: !10, scope: !2, type: !4, function: i32 (i32, i32, i32, i32)* @foo) !2 = !DIFile(filename: "test.c", directory: "/dir") !3 = !DICompileUnit(language: DW_LANG_C99, producer: "producer", isOptimized: false, emissionKind: 0, file: !10, enums: !11, retainedTypes: !11, subprograms: !9) diff --git a/test/DebugInfo/2010-03-12-llc-crash.ll b/test/DebugInfo/2010-03-12-llc-crash.ll index 60e657ce5ce..fcca6c52170 100644 --- a/test/DebugInfo/2010-03-12-llc-crash.ll +++ b/test/DebugInfo/2010-03-12-llc-crash.ll @@ -1,5 +1,5 @@ ; RUN: llc -O0 < %s -o /dev/null -; llc should not crash on this invalid input. +; llc should not crash on this optimized out debug info. ; PR6588 declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone @@ -9,7 +9,7 @@ entry: ret void } -!0 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "sy", line: 890, arg: 0, scope: !1, file: !2, type: !7) +!0 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "sy", line: 890, arg: 1, scope: !1, file: !2, type: !7) !1 = !DISubprogram(name: "foo", linkageName: "foo", line: 892, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !8, scope: !3, type: !4) !2 = !DIFile(filename: "qpainter.h", directory: "QtGui") !3 = !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang 1.1", isOptimized: true, emissionKind: 0, file: !9, enums: !10, retainedTypes: !10) diff --git a/test/DebugInfo/2010-03-24-MemberFn.ll b/test/DebugInfo/2010-03-24-MemberFn.ll index 627364ea4f0..83ff5f97805 100644 --- a/test/DebugInfo/2010-03-24-MemberFn.ll +++ b/test/DebugInfo/2010-03-24-MemberFn.ll @@ -57,7 +57,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone !15 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial, file: !25, scope: !4, baseType: !9) !16 = !DILocation(line: 3, scope: !1) !17 = !DILocation(line: 3, scope: !3) -!18 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "this", line: 3, arg: 0, scope: !12, file: !10, type: !19) +!18 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "this", line: 3, arg: 1, scope: !12, file: !10, type: !19) !19 = !DIDerivedType(tag: DW_TAG_const_type, size: 64, align: 64, flags: DIFlagArtificial, file: !25, scope: !4, baseType: !20) !20 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, file: !25, scope: !4, baseType: !9) !21 = !DILocation(line: 3, scope: !12) diff --git a/test/DebugInfo/2010-04-06-NestedFnDbgInfo.ll b/test/DebugInfo/2010-04-06-NestedFnDbgInfo.ll index 45ed4962f7b..68fd0a93eac 100644 --- a/test/DebugInfo/2010-04-06-NestedFnDbgInfo.ll +++ b/test/DebugInfo/2010-04-06-NestedFnDbgInfo.ll @@ -87,7 +87,7 @@ entry: !14 = !DILocation(line: 16, column: 5, scope: !1) !15 = !DILocation(line: 17, column: 3, scope: !1) !16 = !DILocation(line: 18, column: 1, scope: !2) -!17 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "this", line: 4, arg: 0, scope: !10, file: !3, type: !13) +!17 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "this", line: 4, arg: 1, scope: !10, file: !3, type: !13) !18 = !DILocation(line: 4, column: 7, scope: !10) !19 = !DILocalVariable(tag: DW_TAG_auto_variable, name: "a", line: 9, scope: !20, file: !3, type: !21) !20 = distinct !DILexicalBlock(line: 4, column: 12, file: !38, scope: !10) @@ -103,7 +103,7 @@ entry: !30 = !DILocation(line: 10, column: 5, scope: !20) !31 = !DILocation(line: 11, column: 5, scope: !20) !32 = !DILocation(line: 12, column: 3, scope: !10) -!33 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "this", line: 7, arg: 0, scope: !23, file: !3, type: !26) +!33 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "this", line: 7, arg: 1, scope: !23, file: !3, type: !26) !34 = !DILocation(line: 7, column: 11, scope: !23) !35 = !DILocation(line: 7, column: 19, scope: !36) !36 = distinct !DILexicalBlock(line: 7, column: 17, file: !38, scope: !23) diff --git a/test/DebugInfo/2010-05-03-DisableFramePtr.ll b/test/DebugInfo/2010-05-03-DisableFramePtr.ll index 660e9dba498..96251596d3a 100644 --- a/test/DebugInfo/2010-05-03-DisableFramePtr.ll +++ b/test/DebugInfo/2010-05-03-DisableFramePtr.ll @@ -18,7 +18,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone !llvm.dbg.cu = !{!3} !llvm.module.flags = !{!19} -!0 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "userUPP", line: 7, arg: 0, scope: !1, file: !2, type: !6) +!0 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "userUPP", line: 7, arg: 1, scope: !1, file: !2, type: !6) !1 = !DISubprogram(name: "DisposeDMNotificationUPP", linkageName: "DisposeDMNotificationUPP", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !16, scope: null, type: !4) !2 = !DIFile(filename: "t.c", directory: "/Users/echeng/LLVM/radars/r7937664/") !3 = !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build 9999)", isOptimized: true, emissionKind: 0, file: !16, enums: !17, retainedTypes: !17, subprograms: !18) diff --git a/test/DebugInfo/2010-05-03-OriginDIE.ll b/test/DebugInfo/2010-05-03-OriginDIE.ll index da1e57caba1..40b29fe31f9 100644 --- a/test/DebugInfo/2010-05-03-OriginDIE.ll +++ b/test/DebugInfo/2010-05-03-OriginDIE.ll @@ -58,18 +58,18 @@ declare void @uuid_LtoB(i8*, i8*) !5 = !DISubroutineType(types: !6) !6 = !{null} !7 = !DILocation(line: 810, scope: !1) -!8 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "data", line: 201, arg: 0, scope: !9, file: !10, type: !11) +!8 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "data", line: 201, arg: 1, scope: !9, file: !10, type: !11) !9 = !DISubprogram(name: "_OSSwapInt64", linkageName: "_OSSwapInt64", line: 202, isLocal: true, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !10, scope: null, type: !5) !10 = !DIFile(filename: "OSByteOrder.h", directory: "/usr/include/libkern/ppc") !11 = !DIDerivedType(tag: DW_TAG_typedef, name: "uint64_t", line: 59, file: !36, scope: !3, baseType: !13) !12 = !DIFile(filename: "stdint.h", directory: "/usr/4.2.1/include") !13 = !DIBasicType(tag: DW_TAG_base_type, name: "long long unsigned int", size: 64, align: 64, encoding: DW_ATE_unsigned) !14 = !DILocation(line: 202, scope: !9, inlinedAt: !7) -!15 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "base", line: 92, arg: 0, scope: !16, file: !10, type: !17) +!15 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "base", line: 92, arg: 2, scope: !16, file: !10, type: !17) !16 = !DISubprogram(name: "OSReadSwapInt64", linkageName: "OSReadSwapInt64", line: 95, isLocal: true, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !38, scope: null, type: !5) !17 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 32, align: 32, file: !39, scope: !3, baseType: null) !18 = !{} -!19 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "byteOffset", line: 94, arg: 0, scope: !16, file: !10, type: !20) +!19 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "byteOffset", line: 94, arg: 3, scope: !16, file: !10, type: !20) !20 = !DIDerivedType(tag: DW_TAG_typedef, name: "uintptr_t", line: 114, file: !37, scope: !3, baseType: !22) !21 = !DIFile(filename: "types.h", directory: "/usr/include/ppc") !22 = !DIBasicType(tag: DW_TAG_base_type, name: "long unsigned int", size: 32, align: 32, encoding: DW_ATE_unsigned) diff --git a/test/DebugInfo/2010-06-29-InlinedFnLocalVar.ll b/test/DebugInfo/2010-06-29-InlinedFnLocalVar.ll index 27a0535bc8c..0d7dae9c8c7 100644 --- a/test/DebugInfo/2010-06-29-InlinedFnLocalVar.ll +++ b/test/DebugInfo/2010-06-29-InlinedFnLocalVar.ll @@ -34,10 +34,10 @@ entry: !6 = !DISubprogram(name: "bar", linkageName: "bar", line: 14, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, file: !27, scope: !1, type: !7, function: i32 ()* @bar) !7 = !DISubroutineType(types: !8) !8 = !{!5} -!9 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "j", line: 9, arg: 0, scope: !0, file: !1, type: !5) +!9 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "j", line: 9, arg: 1, scope: !0, file: !1, type: !5) !10 = !DILocalVariable(tag: DW_TAG_auto_variable, name: "xyz", line: 10, scope: !11, file: !1, type: !12) -!59 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "j", line: 9, arg: 0, scope: !0, file: !1, type: !5) +!59 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "j", line: 9, arg: 1, scope: !0, file: !1, type: !5) !60 = !DILocalVariable(tag: DW_TAG_auto_variable, name: "xyz", line: 10, scope: !11, file: !1, type: !12) !11 = distinct !DILexicalBlock(line: 9, column: 0, file: !1, scope: !0) diff --git a/test/DebugInfo/2010-10-01-crash.ll b/test/DebugInfo/2010-10-01-crash.ll index 5c736ba8555..c1d161ce586 100644 --- a/test/DebugInfo/2010-10-01-crash.ll +++ b/test/DebugInfo/2010-10-01-crash.ll @@ -17,7 +17,7 @@ declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, !1 = !DIFile(filename: "GSFusedSilica.m", directory: "/Volumes/Data/Users/sabre/Desktop") !2 = !DICompileUnit(language: DW_LANG_ObjC, producer: "clang version 2.9 (trunk 115292)", isOptimized: true, runtimeVersion: 1, emissionKind: 0, file: !25, enums: !26, retainedTypes: !26) !5 = !DIDerivedType(tag: DW_TAG_typedef, name: "CGRect", line: 49, file: !25, baseType: null) -!23 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "rect", line: 53, arg: 0, scope: !0, file: !1, type: !5) +!23 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "rect", line: 53, arg: 2, scope: !0, file: !1, type: !5) !24 = !DILocation(line: 53, column: 33, scope: !0) !25 = !DIFile(filename: "GSFusedSilica.m", directory: "/Volumes/Data/Users/sabre/Desktop") !26 = !{} diff --git a/test/DebugInfo/Mips/InlinedFnLocalVar.ll b/test/DebugInfo/Mips/InlinedFnLocalVar.ll index 2badeba2f57..5c67cc9ea98 100644 --- a/test/DebugInfo/Mips/InlinedFnLocalVar.ll +++ b/test/DebugInfo/Mips/InlinedFnLocalVar.ll @@ -34,10 +34,10 @@ entry: !6 = !DISubprogram(name: "bar", linkageName: "bar", line: 14, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, file: !27, scope: !1, type: !7, function: i32 ()* @bar) !7 = !DISubroutineType(types: !8) !8 = !{!5} -!9 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "j", line: 9, arg: 0, scope: !0, file: !1, type: !5) +!9 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "j", line: 9, arg: 1, scope: !0, file: !1, type: !5) !10 = !DILocalVariable(tag: DW_TAG_auto_variable, name: "xyz", line: 10, scope: !11, file: !1, type: !12) -!59 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "j", line: 9, arg: 0, scope: !0, file: !1, type: !5) +!59 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "j", line: 9, arg: 1, scope: !0, file: !1, type: !5) !60 = !DILocalVariable(tag: DW_TAG_auto_variable, name: "xyz", line: 10, scope: !11, file: !1, type: !12) !11 = distinct !DILexicalBlock(line: 9, column: 0, file: !1, scope: !0) diff --git a/test/DebugInfo/X86/2010-04-13-PubType.ll b/test/DebugInfo/X86/2010-04-13-PubType.ll index 85c499d5963..aa1bf4aaf5f 100644 --- a/test/DebugInfo/X86/2010-04-13-PubType.ll +++ b/test/DebugInfo/X86/2010-04-13-PubType.ll @@ -31,7 +31,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone !llvm.dbg.cu = !{!3} !llvm.module.flags = !{!20} -!0 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "x", line: 7, arg: 0, scope: !1, file: !2, type: !7) +!0 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "x", line: 7, arg: 1, scope: !1, file: !2, type: !7) !1 = !DISubprogram(name: "foo", linkageName: "foo", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 7, file: !18, scope: !2, type: !4, function: i32 (%struct.X*, %struct.Y*)* @foo) !2 = !DIFile(filename: "a.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: !18, enums: !19, retainedTypes: !19, subprograms: !17, imports: null) @@ -45,7 +45,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone !11 = !{!12} !12 = !DIDerivedType(tag: DW_TAG_member, name: "x", line: 5, size: 32, align: 32, file: !18, scope: !10, baseType: !6) !13 = !DILocation(line: 7, scope: !1) -!14 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "y", line: 7, arg: 0, scope: !1, file: !2, type: !9) +!14 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "y", line: 7, arg: 2, scope: !1, file: !2, type: !9) !15 = !DILocation(line: 7, scope: !16) !16 = distinct !DILexicalBlock(line: 7, column: 0, file: !18, scope: !1) !17 = !{!1} diff --git a/test/DebugInfo/X86/InlinedFnLocalVar.ll b/test/DebugInfo/X86/InlinedFnLocalVar.ll index 74de8b6e6a9..c73a7b6a421 100644 --- a/test/DebugInfo/X86/InlinedFnLocalVar.ll +++ b/test/DebugInfo/X86/InlinedFnLocalVar.ll @@ -34,10 +34,10 @@ entry: !6 = !DISubprogram(name: "bar", linkageName: "bar", line: 14, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, file: !27, scope: !1, type: !7, function: i32 ()* @bar) !7 = !DISubroutineType(types: !8) !8 = !{!5} -!9 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "j", line: 9, arg: 0, scope: !0, file: !1, type: !5) +!9 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "j", line: 9, arg: 1, scope: !0, file: !1, type: !5) !10 = !DILocalVariable(tag: DW_TAG_auto_variable, name: "xyz", line: 10, scope: !11, file: !1, type: !12) -!109 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "j", line: 9, arg: 0, scope: !0, file: !1, type: !5) +!109 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "j", line: 9, arg: 1, scope: !0, file: !1, type: !5) !110 = !DILocalVariable(tag: DW_TAG_auto_variable, name: "xyz", line: 10, scope: !11, file: !1, type: !12) !11 = distinct !DILexicalBlock(line: 9, column: 0, file: !1, scope: !0) diff --git a/test/DebugInfo/X86/dbg-byval-parameter.ll b/test/DebugInfo/X86/dbg-byval-parameter.ll index e07109e08f9..a592884496a 100644 --- a/test/DebugInfo/X86/dbg-byval-parameter.ll +++ b/test/DebugInfo/X86/dbg-byval-parameter.ll @@ -28,7 +28,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, 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, imports: null) diff --git a/test/DebugInfo/X86/dbg-merge-loc-entry.ll b/test/DebugInfo/X86/dbg-merge-loc-entry.ll index 14265139b0f..bbcdd59a5b0 100644 --- a/test/DebugInfo/X86/dbg-merge-loc-entry.ll +++ b/test/DebugInfo/X86/dbg-merge-loc-entry.ll @@ -54,7 +54,7 @@ declare %0 @llvm.uadd.with.overflow.i64(i64, i64) nounwind readnone !11 = !{!12, !12, !12} !12 = !DIDerivedType(tag: DW_TAG_typedef, name: "TItype", line: 160, file: !30, scope: !6, baseType: !13) !13 = !DIBasicType(tag: DW_TAG_base_type, size: 128, align: 128, encoding: DW_ATE_signed) -!14 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "u", line: 1093, arg: 0, scope: !9, file: !1, type: !12) +!14 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "u", line: 1093, arg: 1, scope: !9, file: !1, type: !12) !15 = !DILocation(line: 1093, scope: !9) !16 = !{i64 0} !17 = !DILocalVariable(tag: DW_TAG_auto_variable, name: "c", line: 1095, scope: !18, file: !1, type: !19) diff --git a/test/DebugInfo/X86/dbg-value-dag-combine.ll b/test/DebugInfo/X86/dbg-value-dag-combine.ll index 4331c659136..e73d161ecb7 100644 --- a/test/DebugInfo/X86/dbg-value-dag-combine.ll +++ b/test/DebugInfo/X86/dbg-value-dag-combine.ll @@ -31,7 +31,7 @@ entry: !4 = !{null, !5} !5 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 32, align: 32, scope: !2, baseType: !6) !6 = !DIBasicType(tag: DW_TAG_base_type, name: "unsigned int", size: 32, align: 32, encoding: DW_ATE_unsigned) -!7 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "ip", line: 1, arg: 0, scope: !0, file: !1, type: !5) +!7 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "ip", line: 1, arg: 1, scope: !0, file: !1, type: !5) !8 = !DILocation(line: 1, column: 42, scope: !0) !9 = !DILocalVariable(tag: DW_TAG_auto_variable, name: "gid", line: 3, scope: !10, file: !1, type: !6) !10 = distinct !DILexicalBlock(line: 2, column: 1, file: !19, scope: !0) diff --git a/test/DebugInfo/X86/dbg-value-isel.ll b/test/DebugInfo/X86/dbg-value-isel.ll index 04e4531d1d7..9d5a8b76ac4 100644 --- a/test/DebugInfo/X86/dbg-value-isel.ll +++ b/test/DebugInfo/X86/dbg-value-isel.ll @@ -89,7 +89,7 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnon !5 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 32, align: 32, scope: !2, baseType: !6) !6 = !DIDerivedType(tag: DW_TAG_typedef, name: "uint", file: !20, scope: !2, baseType: !7) !7 = !DIBasicType(tag: DW_TAG_base_type, name: "unsigned int", size: 32, align: 32, encoding: DW_ATE_unsigned) -!8 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "ip", line: 1, arg: 0, scope: !0, file: !1, type: !5) +!8 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "ip", line: 1, arg: 1, scope: !0, file: !1, type: !5) !9 = !DILocation(line: 1, column: 32, scope: !0) !10 = !DILocalVariable(tag: DW_TAG_auto_variable, name: "tid", line: 3, scope: !11, file: !1, type: !6) !11 = distinct !DILexicalBlock(line: 2, column: 1, file: !1, scope: !0) diff --git a/test/DebugInfo/X86/dbg-value-location.ll b/test/DebugInfo/X86/dbg-value-location.ll index 219fa7a5ff3..631c05e1844 100644 --- a/test/DebugInfo/X86/dbg-value-location.ll +++ b/test/DebugInfo/X86/dbg-value-location.ll @@ -62,7 +62,7 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnon !9 = !DISubroutineType(types: !10) !10 = !{!11} !11 = !DIBasicType(tag: DW_TAG_base_type, name: "unsigned char", size: 8, align: 8, encoding: DW_ATE_unsigned_char) -!12 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "var", line: 19509, arg: 0, scope: !0, file: !1, type: !5) +!12 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "var", line: 19509, arg: 1, scope: !0, file: !1, type: !5) !13 = !DILocation(line: 19509, column: 20, scope: !0) !14 = !DILocation(line: 18091, column: 2, scope: !15, inlinedAt: !17) !15 = distinct !DILexicalBlock(line: 18086, column: 1, file: !26, scope: !16) diff --git a/test/DebugInfo/X86/dbg-value-range.ll b/test/DebugInfo/X86/dbg-value-range.ll index a8fa9073fa7..b7d5d520add 100644 --- a/test/DebugInfo/X86/dbg-value-range.ll +++ b/test/DebugInfo/X86/dbg-value-range.ll @@ -26,7 +26,7 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnon !3 = !DISubroutineType(types: !4) !4 = !{!5} !5 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!6 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "b", line: 5, arg: 0, scope: !0, file: !1, type: !7) +!6 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "b", line: 5, arg: 1, scope: !0, file: !1, type: !7) !7 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, scope: !2, baseType: !8) !8 = !DICompositeType(tag: DW_TAG_structure_type, name: "a", line: 1, size: 32, align: 32, file: !22, scope: !2, elements: !9) !9 = !{!10} diff --git a/test/DebugInfo/inheritance.ll b/test/DebugInfo/inheritance.ll index 8a29d2e576a..10d799b54f7 100644 --- a/test/DebugInfo/inheritance.ll +++ b/test/DebugInfo/inheritance.ll @@ -129,7 +129,7 @@ declare void @_ZdlPv(i8*) nounwind !21 = !DILocation(line: 11, scope: !1) !22 = !DILocation(line: 13, scope: !1) !23 = !DILocation(line: 14, scope: !1) -!24 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "this", line: 13, arg: 0, scope: !25, file: !4, type: !26) +!24 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "this", line: 13, arg: 1, scope: !25, file: !4, type: !26) !25 = !DISubprogram(name: "test1", linkageName: "_ZN5test1C1Ev", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scope: !4, type: !15) !26 = !DIDerivedType(tag: DW_TAG_const_type, size: 64, align: 64, flags: DIFlagArtificial, file: !4, baseType: !27) !27 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, file: !4, baseType: !8) @@ -137,13 +137,13 @@ declare void @_ZdlPv(i8*) nounwind !29 = !DILocation(line: 1, scope: !30) !30 = distinct !DILexicalBlock(line: 0, column: 0, file: !44, scope: !31) !31 = distinct !DILexicalBlock(line: 0, column: 0, file: !44, scope: !25) -!32 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "this", line: 4, arg: 0, scope: !33, file: !4, type: !26) +!32 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "this", line: 4, arg: 1, scope: !33, file: !4, type: !26) !33 = !DISubprogram(name: "~test1", linkageName: "_ZN5test1D1Ev", line: 4, isLocal: false, isDefinition: true, virtuality: DW_VIRTUALITY_virtual, virtualIndex: 6, isOptimized: false, scope: !8, type: !15, containingType: !8) !34 = !DILocation(line: 4, scope: !33) !35 = !DILocation(line: 5, scope: !36) !36 = distinct !DILexicalBlock(line: 0, column: 0, file: !44, scope: !33) !37 = !DILocation(line: 6, scope: !36) -!38 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "this", line: 4, arg: 0, scope: !39, file: !4, type: !26) +!38 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "this", line: 4, arg: 1, scope: !39, file: !4, type: !26) !39 = !DISubprogram(name: "~test1", linkageName: "_ZN5test1D0Ev", line: 4, isLocal: false, isDefinition: true, virtuality: DW_VIRTUALITY_virtual, virtualIndex: 6, isOptimized: false, scope: !8, type: !15, containingType: !8) !40 = !DILocation(line: 4, scope: !39) !41 = !DILocation(line: 5, scope: !42) diff --git a/test/Transforms/DeadArgElim/2010-04-30-DbgInfo.ll b/test/Transforms/DeadArgElim/2010-04-30-DbgInfo.ll index 5ff05f0d685..bd9704eeef4 100644 --- a/test/Transforms/DeadArgElim/2010-04-30-DbgInfo.ll +++ b/test/Transforms/DeadArgElim/2010-04-30-DbgInfo.ll @@ -45,7 +45,7 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnon !llvm.dbg.cu = !{!3} !llvm.module.flags = !{!30} -!0 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "name", line: 8, arg: 0, scope: !1, file: !2, type: !6) +!0 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "name", line: 8, arg: 1, scope: !1, file: !2, type: !6) !1 = !DISubprogram(name: "vfs_addname", linkageName: "vfs_addname", line: 12, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !28, scope: !2, type: !4) !2 = !DIFile(filename: "tail.c", directory: "/Users/echeng/LLVM/radars/r7927803/") !3 = !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build 9999)", isOptimized: true, emissionKind: 0, file: !28, enums: !29, retainedTypes: !29) @@ -55,20 +55,20 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnon !7 = !DIDerivedType(tag: DW_TAG_const_type, size: 8, align: 8, file: !28, scope: !2, baseType: !8) !8 = !DIBasicType(tag: DW_TAG_base_type, name: "char", size: 8, align: 8, encoding: DW_ATE_signed_char) !9 = !DIBasicType(tag: DW_TAG_base_type, name: "unsigned int", size: 32, align: 32, encoding: DW_ATE_unsigned) -!10 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "len", line: 9, arg: 0, scope: !1, file: !2, type: !9) -!11 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "hash", line: 10, arg: 0, scope: !1, file: !2, type: !9) -!12 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "flags", line: 11, arg: 0, scope: !1, file: !2, type: !9) +!10 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "len", line: 9, arg: 2, scope: !1, file: !2, type: !9) +!11 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "hash", line: 10, arg: 3, scope: !1, file: !2, type: !9) +!12 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "flags", line: 11, arg: 4, scope: !1, file: !2, type: !9) !13 = !DILocation(line: 13, scope: !14) !14 = distinct !DILexicalBlock(line: 12, column: 0, file: !28, scope: !1) -!15 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "name", line: 17, arg: 0, scope: !16, file: !2, type: !6) +!15 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "name", line: 17, arg: 1, scope: !16, file: !2, type: !6) !16 = !DISubprogram(name: "add_name_internal", linkageName: "add_name_internal", line: 22, isLocal: true, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !28, scope: !2, type: !17) !17 = !DISubroutineType(types: !18) !18 = !{!6, !6, !9, !9, !19, !9} !19 = !DIBasicType(tag: DW_TAG_base_type, name: "unsigned char", size: 8, align: 8, encoding: DW_ATE_unsigned_char) -!20 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "len", line: 18, arg: 0, scope: !16, file: !2, type: !9) -!21 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "hash", line: 19, arg: 0, scope: !16, file: !2, type: !9) -!22 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "extra", line: 20, arg: 0, scope: !16, file: !2, type: !19) -!23 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "flags", line: 21, arg: 0, scope: !16, file: !2, type: !9) +!20 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "len", line: 18, arg: 2, scope: !16, file: !2, type: !9) +!21 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "hash", line: 19, arg: 3, scope: !16, file: !2, type: !9) +!22 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "extra", line: 20, arg: 4, scope: !16, file: !2, type: !19) +!23 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "flags", line: 21, arg: 5, scope: !16, file: !2, type: !9) !24 = !DILocation(line: 23, scope: !25) !25 = distinct !DILexicalBlock(line: 22, column: 0, file: !28, scope: !16) !26 = !DILocation(line: 24, scope: !25) diff --git a/test/Transforms/GlobalOpt/2009-03-05-dbg.ll b/test/Transforms/GlobalOpt/2009-03-05-dbg.ll index a8d618ae522..07d3979acaf 100644 --- a/test/Transforms/GlobalOpt/2009-03-05-dbg.ll +++ b/test/Transforms/GlobalOpt/2009-03-05-dbg.ll @@ -58,7 +58,7 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnon !0 = !DIGlobalVariable(name: "Stop", line: 2, isLocal: true, isDefinition: true, scope: !1, file: !1, type: !2, variable: i32* @Stop) !1 = !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: true, emissionKind: 0, file: !20, enums: !21, retainedTypes: !21) !2 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!3 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "i", line: 4, arg: 0, scope: !4, file: !1, type: !2) +!3 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "i", line: 4, arg: 1, scope: !4, file: !1, type: !2) !4 = !DISubprogram(name: "foo", linkageName: "foo", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scope: !1, type: !5) !5 = !DISubroutineType(types: !6) !6 = !{!2, !2} diff --git a/test/Transforms/LoopRotate/dbgvalue.ll b/test/Transforms/LoopRotate/dbgvalue.ll index 9bcca15ab55..d65884698d4 100644 --- a/test/Transforms/LoopRotate/dbgvalue.ll +++ b/test/Transforms/LoopRotate/dbgvalue.ll @@ -90,11 +90,11 @@ for.end: !3 = !DISubroutineType(types: !4) !4 = !{!5} !5 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!6 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "x", line: 32, arg: 0, scope: !0, file: !1, type: !5) +!6 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "x", line: 32, arg: 1, scope: !0, file: !1, type: !5) !7 = !DILocation(line: 32, column: 13, scope: !0) -!8 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "y", line: 32, arg: 0, scope: !0, file: !1, type: !5) +!8 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "y", line: 32, arg: 2, scope: !0, file: !1, type: !5) !9 = !DILocation(line: 32, column: 20, scope: !0) -!10 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "z", line: 32, arg: 0, scope: !0, file: !1, type: !5) +!10 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "z", line: 32, arg: 3, scope: !0, file: !1, type: !5) !11 = !DILocation(line: 32, column: 27, scope: !0) !12 = !DILocation(line: 33, column: 3, scope: !13) !13 = distinct !DILexicalBlock(line: 32, column: 30, file: !18, scope: !0) diff --git a/test/Transforms/Mem2Reg/ConvertDebugInfo.ll b/test/Transforms/Mem2Reg/ConvertDebugInfo.ll index 8a2eedd96ba..2a0fee97f24 100644 --- a/test/Transforms/Mem2Reg/ConvertDebugInfo.ll +++ b/test/Transforms/Mem2Reg/ConvertDebugInfo.ll @@ -35,7 +35,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone !llvm.dbg.cu = !{!3} !llvm.module.flags = !{!14} -!0 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "i", line: 2, arg: 0, scope: !1, file: !2, type: !7) +!0 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "i", line: 2, arg: 1, scope: !1, file: !2, type: !7) !1 = !DISubprogram(name: "testfunc", linkageName: "testfunc", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 2, file: !12, scope: !2, type: !4, function: double (i32, double)* @testfunc) !2 = !DIFile(filename: "testfunc.c", directory: "/tmp") !3 = !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: true, emissionKind: 0, file: !12, enums: !13, retainedTypes: !13) @@ -44,7 +44,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone !6 = !DIBasicType(tag: DW_TAG_base_type, name: "double", size: 64, align: 64, encoding: DW_ATE_float) !7 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !8 = !DILocation(line: 2, scope: !1) -!9 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "j", line: 2, arg: 0, scope: !1, file: !2, type: !6) +!9 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "j", line: 2, arg: 2, scope: !1, file: !2, type: !6) !10 = !DILocation(line: 3, scope: !11) !11 = distinct !DILexicalBlock(line: 2, column: 0, file: !12, scope: !1) !12 = !DIFile(filename: "testfunc.c", directory: "/tmp") diff --git a/test/Transforms/Mem2Reg/ConvertDebugInfo2.ll b/test/Transforms/Mem2Reg/ConvertDebugInfo2.ll index 831221b7f97..aff2e608d90 100644 --- a/test/Transforms/Mem2Reg/ConvertDebugInfo2.ll +++ b/test/Transforms/Mem2Reg/ConvertDebugInfo2.ll @@ -32,7 +32,7 @@ return: ; preds = %entry !llvm.dbg.cu = !{!3} !llvm.module.flags = !{!22} -!0 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "a", line: 8, arg: 0, scope: !1, file: !2, type: !6) +!0 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "a", line: 8, arg: 1, scope: !1, file: !2, type: !6) !1 = !DISubprogram(name: "baz", linkageName: "baz", line: 8, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 8, file: !20, scope: !2, type: !4, function: void (i32)* @baz) !2 = !DIFile(filename: "bar.c", directory: "/tmp/") !3 = !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: true, emissionKind: 0, file: !20, enums: !21, retainedTypes: !21) @@ -41,15 +41,15 @@ return: ; preds = %entry !6 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !7 = !DILocation(line: 8, scope: !1) !8 = !DILocation(line: 9, scope: !1) -!9 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "x", line: 4, arg: 0, scope: !10, file: !2, type: !6) +!9 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "x", line: 4, arg: 1, scope: !10, file: !2, type: !6) !10 = !DISubprogram(name: "bar", linkageName: "bar", line: 4, isLocal: true, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 4, file: !20, scope: !2, type: !11) !11 = !DISubroutineType(types: !12) !12 = !{null, !6, !13, !14} !13 = !DIBasicType(tag: DW_TAG_base_type, name: "long int", size: 64, align: 64, encoding: DW_ATE_signed) !14 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, file: !20, scope: !2, baseType: null) !15 = !DILocation(line: 4, scope: !10, inlinedAt: !8) -!16 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "y", line: 4, arg: 0, scope: !10, file: !2, type: !13) -!17 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "z", line: 4, arg: 0, scope: !10, file: !2, type: !14) +!16 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "y", line: 4, arg: 2, scope: !10, file: !2, type: !13) +!17 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "z", line: 4, arg: 3, scope: !10, file: !2, type: !14) !18 = !DILocation(line: 5, scope: !10, inlinedAt: !8) !19 = !DILocation(line: 10, scope: !1) !20 = !DIFile(filename: "bar.c", directory: "/tmp/") diff --git a/test/Transforms/StripSymbols/strip-dead-debug-info.ll b/test/Transforms/StripSymbols/strip-dead-debug-info.ll index 08eff003dfc..08a1d507949 100644 --- a/test/Transforms/StripSymbols/strip-dead-debug-info.ll +++ b/test/Transforms/StripSymbols/strip-dead-debug-info.ll @@ -45,7 +45,7 @@ attributes #2 = { nounwind readonly ssp } !12 = !{!9, !9} !13 = !DILocalVariable(tag: DW_TAG_auto_variable, name: "bb", line: 5, scope: !14, file: !5, type: !9) !14 = distinct !DILexicalBlock(line: 5, column: 0, file: !1, scope: !3) -!15 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "i", line: 7, arg: 0, scope: !10, file: !5, type: !9) +!15 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "i", line: 7, arg: 1, scope: !10, file: !5, type: !9) !16 = !DIGlobalVariable(name: "abcd", line: 2, isLocal: true, isDefinition: true, scope: !5, file: !5, type: !9) !17 = !DIGlobalVariable(name: "xyz", line: 3, isLocal: false, isDefinition: true, scope: !5, file: !5, type: !9, variable: i32* @xyz) !18 = !DILocation(line: 6, scope: !19)