Skip to content

Commit 814b8e9

Browse files
committed
DI: Require subprogram definitions to be distinct
As a follow-up to r246098, require `DISubprogram` definitions (`isDefinition: true`) to be 'distinct'. Specifically, add an assembler check, a verifier check, and bitcode upgrading logic to combat testcase bitrot after the `DIBuilder` change. While working on the testcases, I realized that test/Linker/subprogram-linkonce-weak-odr.ll isn't relevant anymore. Its purpose was to check for a corner case in PR22792 where two subprogram definitions match exactly and share the same metadata node. The new verifier check, requiring that subprogram definitions are 'distinct', precludes that possibility. I updated almost all the IR with the following script: git grep -l -E -e '= !DISubprogram\(.* isDefinition: true' | grep -v test/Bitcode | xargs sed -i '' -e 's/= \(!DISubprogram(.*, isDefinition: true\)/= distinct \1/' Likely some variant of would work for out-of-tree testcases. llvm-svn: 246327
1 parent 3a63f3f commit 814b8e9

File tree

403 files changed

+753
-928
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

403 files changed

+753
-928
lines changed

llvm/docs/SourceLevelDebugging.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ Compiled to LLVM, this function would be represented like this:
263263
!1 = !DIFile(filename: "/dev/stdin", directory: "/Users/dexonsmith/data/llvm/debug-info")
264264
!2 = !{}
265265
!3 = !{!4}
266-
!4 = !DISubprogram(name: "foo", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, isOptimized: false, function: void ()* @foo, variables: !2)
266+
!4 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, isOptimized: false, function: void ()* @foo, variables: !2)
267267
!5 = !DISubroutineType(types: !6)
268268
!6 = !{null}
269269
!7 = !{i32 2, !"Dwarf Version", i32 2}

llvm/lib/AsmParser/LLParser.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3747,6 +3747,7 @@ bool LLParser::ParseDICompileUnit(MDNode *&Result, bool IsDistinct) {
37473747
/// isOptimized: false, function: void ()* @_Z3foov,
37483748
/// templateParams: !4, declaration: !5, variables: !6)
37493749
bool LLParser::ParseDISubprogram(MDNode *&Result, bool IsDistinct) {
3750+
auto Loc = Lex.getLoc();
37503751
#define VISIT_MD_FIELDS(OPTIONAL, REQUIRED) \
37513752
OPTIONAL(scope, MDField, ); \
37523753
OPTIONAL(name, MDStringField, ); \
@@ -3769,6 +3770,11 @@ bool LLParser::ParseDISubprogram(MDNode *&Result, bool IsDistinct) {
37693770
PARSE_MD_FIELDS();
37703771
#undef VISIT_MD_FIELDS
37713772

3773+
if (isDefinition.Val && !IsDistinct)
3774+
return Lex.Error(
3775+
Loc,
3776+
"missing 'distinct', required for !DISubprogram when 'isDefinition'");
3777+
37723778
Result = GET_OR_DISTINCT(
37733779
DISubprogram, (Context, scope.Val, name.Val, linkageName.Val, file.Val,
37743780
line.Val, type.Val, isLocal.Val, isDefinition.Val,

llvm/lib/Bitcode/Reader/BitcodeReader.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1950,7 +1950,8 @@ std::error_code BitcodeReader::parseMetadata() {
19501950

19511951
MDValueList.assignValue(
19521952
GET_OR_DISTINCT(
1953-
DISubprogram, Record[0],
1953+
DISubprogram,
1954+
Record[0] || Record[8], // All definitions should be distinct.
19541955
(Context, getMDOrNull(Record[1]), getMDString(Record[2]),
19551956
getMDString(Record[3]), getMDOrNull(Record[4]), Record[5],
19561957
getMDOrNull(Record[6]), Record[7], Record[8], Record[9],

llvm/lib/IR/Verifier.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -956,6 +956,9 @@ void Verifier::visitDISubprogram(const DISubprogram &N) {
956956
Assert(!hasConflictingReferenceFlags(N.getFlags()), "invalid reference flags",
957957
&N);
958958

959+
if (N.isDefinition())
960+
Assert(N.isDistinct(), "subprogram definitions must be distinct", &N);
961+
959962
auto *F = N.getFunction();
960963
if (!F)
961964
return;

llvm/test/Assembler/2010-02-05-FunctionLocalMetadataBecomesNull.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone
2727
!7 = !{!1}
2828
!6 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 (trunk 131941)", isOptimized: true, emissionKind: 0, file: !8, enums: !9, retainedTypes: !9, subprograms: !7)
2929
!0 = !DILocalVariable(name: "c", line: 2, scope: !1, file: !2, type: !5)
30-
!1 = !DISubprogram(name: "main", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !8, scope: !2, type: !3, function: i32 ()* @main)
30+
!1 = distinct !DISubprogram(name: "main", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !8, scope: !2, type: !3, function: i32 ()* @main)
3131
!2 = !DIFile(filename: "/d/j/debug-test.c", directory: "/Volumes/Data/b")
3232
!3 = !DISubroutineType(types: !4)
3333
!4 = !{!5}

llvm/test/Assembler/diimportedentity.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
; CHECK: !named = !{!0, !1, !2, !3, !3}
55
!named = !{!0, !1, !2, !3, !4}
66

7-
; CHECK: !0 = !DISubprogram({{.*}})
7+
; CHECK: !0 = distinct !DISubprogram({{.*}})
88
; CHECK-NEXT: !1 = !DICompositeType({{.*}})
9-
!0 = !DISubprogram(name: "foo")
9+
!0 = distinct !DISubprogram(name: "foo")
1010
!1 = !DICompositeType(tag: DW_TAG_structure_type, name: "Class", size: 32, align: 32)
1111

1212
; CHECK-NEXT: !2 = !DIImportedEntity(tag: DW_TAG_imported_module, name: "foo", scope: !0, entity: !1, line: 7)

llvm/test/Assembler/dilexicalblock.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
!named = !{!0, !1, !2, !3, !4, !5, !6, !7, !8, !9}
66

77
!0 = distinct !{}
8-
!1 = !DISubprogram(name: "foo", scope: !2)
8+
!1 = distinct !DISubprogram(name: "foo", scope: !2)
99
!2 = !DIFile(filename: "path/to/file", directory: "/path/to/dir")
1010

1111
; CHECK: !3 = !DILexicalBlock(scope: !1, file: !2, line: 7, column: 35)

llvm/test/Assembler/dilocation.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
; CHECK: !named = !{!0, !1, !1, !2, !2, !3, !3, !4}
55
!named = !{!0, !1, !2, !3, !4, !5, !6, !7}
66

7-
; CHECK: !0 = !DISubprogram(
8-
!0 = !DISubprogram()
7+
; CHECK: !0 = distinct !DISubprogram(
8+
!0 = distinct !DISubprogram()
99

1010
; CHECK-NEXT: !1 = !DILocation(line: 3, column: 7, scope: !0)
1111
!1 = !DILocation(line: 3, column: 7, scope: !0)

llvm/test/Assembler/disubprogram.ll

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,18 @@ declare void @_Z3foov()
1212
!3 = !DISubroutineType(types: !0)
1313
!4 = distinct !DICompositeType(tag: DW_TAG_structure_type)
1414
!5 = distinct !{}
15-
!6 = distinct !DISubprogram(isDefinition: false)
16-
!7 = distinct !{}
15+
!6 = distinct !{}
1716

18-
; CHECK: !8 = !DISubprogram(name: "foo", linkageName: "_Zfoov", scope: !1, file: !2, line: 7, type: !3, isLocal: true, isDefinition: false, scopeLine: 8, containingType: !4, virtuality: DW_VIRTUALITY_pure_virtual, virtualIndex: 10, flags: DIFlagPrototyped, isOptimized: true, function: void ()* @_Z3foov, templateParams: !5, declaration: !6, variables: !7)
19-
!8 = !DISubprogram(name: "foo", linkageName: "_Zfoov", scope: !1,
20-
file: !2, line: 7, type: !3, isLocal: true,
21-
isDefinition: false, scopeLine: 8, containingType: !4,
22-
virtuality: DW_VIRTUALITY_pure_virtual, virtualIndex: 10,
23-
flags: DIFlagPrototyped, isOptimized: true, function: void ()* @_Z3foov,
24-
templateParams: !5, declaration: !6, variables: !7)
17+
; CHECK: !7 = distinct !DISubprogram(scope: null, isLocal: false, isDefinition: true, isOptimized: false)
18+
!7 = distinct !DISubprogram()
2519

26-
; CHECK: !9 = !DISubprogram(scope: null, isLocal: false, isDefinition: true, isOptimized: false)
27-
!9 = !DISubprogram()
20+
; CHECK: !8 = !DISubprogram(scope: null, isLocal: false, isDefinition: false, isOptimized: false)
21+
!8 = !DISubprogram(isDefinition: false)
2822

23+
; CHECK: !9 = distinct !DISubprogram(name: "foo", linkageName: "_Zfoov", scope: !1, file: !2, line: 7, type: !3, isLocal: true, isDefinition: true, scopeLine: 8, containingType: !4, virtuality: DW_VIRTUALITY_pure_virtual, virtualIndex: 10, flags: DIFlagPrototyped, isOptimized: true, function: void ()* @_Z3foov, templateParams: !5, declaration: !8, variables: !6)
24+
!9 = distinct !DISubprogram(name: "foo", linkageName: "_Zfoov", scope: !1,
25+
file: !2, line: 7, type: !3, isLocal: true,
26+
isDefinition: true, scopeLine: 8, containingType: !4,
27+
virtuality: DW_VIRTUALITY_pure_virtual, virtualIndex: 10,
28+
flags: DIFlagPrototyped, isOptimized: true, function: void ()* @_Z3foov,
29+
templateParams: !5, declaration: !8, variables: !6)

llvm/test/Assembler/drop-debug-info.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ entry:
1616
!1 = !DIFile(filename: "../llvm/tools/clang/test/CodeGen/debug-info-version.c", directory: "/Users/manmanren/llvm_gmail/release")
1717
!2 = !{i32 0}
1818
!3 = !{!4}
19-
!4 = !DISubprogram(name: "main", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !1, scope: !5, type: !6, function: i32 ()* @main, variables: !2)
19+
!4 = distinct !DISubprogram(name: "main", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !1, scope: !5, type: !6, function: i32 ()* @main, variables: !2)
2020
!5 = !DIFile(filename: "../llvm/tools/clang/test/CodeGen/debug-info-version.c", directory: "/Users/manmanren/llvm_gmail/release")
2121
!6 = !DISubroutineType(types: !7)
2222
!7 = !{!8}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
; RUN: not llvm-as < %s -disable-output 2>&1 | FileCheck %s
2+
3+
; CHECK: <stdin>:[[@LINE+1]]:6: error: missing 'distinct', required for !DISubprogram when 'isDefinition'
4+
!0 = !DISubprogram(isDefinition: true)

llvm/test/Assembler/metadata.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ define void @test_attachment_name() {
3030
}
3131

3232
!0 = !DILocation(line: 662302, column: 26, scope: !1)
33-
!1 = !DISubprogram(name: "foo")
33+
!1 = distinct !DISubprogram(name: "foo")
3434
!2 = distinct !{}
3535
!3 = distinct !{}
3636
!4 = distinct !{}

llvm/test/Bitcode/DILocalVariable-explicit-tags.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
;
44
; RUN: llvm-dis < %s.bc -o - | llvm-as | llvm-dis | FileCheck %s
55

6-
; CHECK: ![[SP:[0-9]+]] = !DISubprogram(name: "foo",{{.*}} variables: ![[VARS:[0-9]+]]
6+
; CHECK: ![[SP:[0-9]+]] = distinct !DISubprogram(name: "foo",{{.*}} variables: ![[VARS:[0-9]+]]
77
; CHECK: ![[VARS]] = !{![[PARAM:[0-9]+]], ![[AUTO:[0-9]+]]}
88
; CHECK: ![[PARAM]] = !DILocalVariable(name: "param", arg: 1, scope: ![[SP]])
99
; CHECK: ![[AUTO]] = !DILocalVariable(name: "auto", scope: ![[SP]])
1010

1111
!named = !{!0}
1212

13-
!0 = !DISubprogram(name: "foo", variables: !1)
13+
!0 = distinct !DISubprogram(name: "foo", variables: !1)
1414
!1 = !{!2, !3}
1515
!2 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "param", arg: 1, scope: !0)
1616
!3 = !DILocalVariable(tag: DW_TAG_auto_variable, name: "auto", scope: !0)
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
; RUN: llvm-dis < %s.bc | FileCheck %s
2+
; Check that subprogram definitions are correctly upgraded to 'distinct'.
3+
; Bitcode compiled from r245235 of the 3.7 release branch.
4+
5+
!named = !{!0}
6+
!0 = distinct !DICompileUnit(language: 12, file: !1, subprograms: !2)
7+
!1 = !DIFile(filename: "path/to/file", directory: "/path/to/dir")
8+
!2 = !{!3}
9+
10+
; CHECK: = distinct !DISubprogram({{.*}}, isDefinition: true
11+
!3 = !DISubprogram(name: "foo", isDefinition: true)
Binary file not shown.

llvm/test/Bitcode/debug-loc-again.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ entry:
3131
!0 = !{i32 2, !"Debug Info Version", i32 3}
3232
!1 = distinct !DICompileUnit(language: DW_LANG_C99, file: !DIFile(filename: "f", directory: "/d"),
3333
subprograms: !{!2})
34-
!2 = !DISubprogram(name: "foo")
34+
!2 = distinct !DISubprogram(name: "foo")
3535
!3 = !DILocation(line: 1, scope: !2)
3636
!4 = !DILocation(line: 2, scope: !2)

llvm/test/BugPoint/metadata.ll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
; CHECK: call void @foo(), !dbg ![[LOC:[0-9]+]], !attach ![[CALL:[0-9]+]]
88
; CHECK: ![[LOC]] = !DILocation(line: 104, column: 105, scope: ![[SCOPE:[0-9]+]])
9-
; CHECK: ![[SCOPE]] = !DISubprogram(name: "test"
10-
; CHECK-SAME: file: ![[FILE:[0-9]+]]
9+
; CHECK: ![[SCOPE]] = distinct !DISubprogram(name: "test"
10+
; CHECK-SAME: file: ![[FILE:[0-9]+]]
1111
; CHECK: ![[FILE]] = !DIFile(filename: "source.c", directory: "/dir")
1212
; CHECK: ![[CALL]] = !{!"the call to foo"}
1313

@@ -31,7 +31,7 @@ declare void @foo()
3131
!3 = !{!"noise"}
3232
!4 = !{!"filler"}
3333

34-
!9 = !DISubprogram(name: "test", file: !15)
34+
!9 = distinct !DISubprogram(name: "test", file: !15)
3535
!10 = !DILocation(line: 100, column: 101, scope: !9)
3636
!11 = !DILocation(line: 102, column: 103, scope: !9)
3737
!12 = !DILocation(line: 104, column: 105, scope: !9)

llvm/test/CodeGen/AArch64/aarch64-2014-08-11-MachineCombinerCrash.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ attributes #1 = { nounwind readnone }
4848
!1 = !DIFile(filename: "test.c", directory: "")
4949
!2 = !{}
5050
!3 = !{!4}
51-
!4 = !DISubprogram(name: "", line: 140, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 141, file: !1, scope: !1, type: !6, function: void ()* @test, variables: !12)
51+
!4 = distinct !DISubprogram(name: "", line: 140, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 141, file: !1, scope: !1, type: !6, function: void ()* @test, variables: !12)
5252
!6 = !DISubroutineType(types: !7)
5353
!7 = !{null, !8}
5454
!8 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !9)

llvm/test/CodeGen/AArch64/arm64-2011-03-17-AsmPrinterCrash.ll

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,18 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone
2222
!llvm.dbg.sp = !{!1, !7, !10, !11, !12}
2323

2424
!0 = !DIGlobalVariable(name: "vsplive", line: 617, isLocal: true, isDefinition: true, scope: !1, file: !2, type: !6)
25-
!1 = !DISubprogram(name: "drt_vsprintf", line: 616, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, file: !20, scope: !2, type: !4)
25+
!1 = distinct !DISubprogram(name: "drt_vsprintf", line: 616, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, file: !20, scope: !2, type: !4)
2626
!2 = !DIFile(filename: "print.i", directory: "/Volumes/Ebi/echeng/radars/r9146594")
2727
!3 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 (http://llvm.org/git/clang.git git:/git/puzzlebox/clang.git/ c4d1aea01c4444eb81bdbf391f1be309127c3cf1)", isOptimized: true, emissionKind: 0, file: !20, enums: !21, retainedTypes: !21)
2828
!4 = !DISubroutineType(types: !5)
2929
!5 = !{!6}
3030
!6 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
31-
!7 = !DISubprogram(name: "putc_mem", line: 30, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, file: !20, scope: !2, type: !8)
31+
!7 = distinct !DISubprogram(name: "putc_mem", line: 30, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, file: !20, scope: !2, type: !8)
3232
!8 = !DISubroutineType(types: !9)
3333
!9 = !{null}
34-
!10 = !DISubprogram(name: "print_double", line: 203, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, file: !20, scope: !2, type: !4)
35-
!11 = !DISubprogram(name: "print_number", line: 75, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, file: !20, scope: !2, type: !4)
36-
!12 = !DISubprogram(name: "get_flags", line: 508, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, file: !20, scope: !2, type: !8)
34+
!10 = distinct !DISubprogram(name: "print_double", line: 203, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, file: !20, scope: !2, type: !4)
35+
!11 = distinct !DISubprogram(name: "print_number", line: 75, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, file: !20, scope: !2, type: !4)
36+
!12 = distinct !DISubprogram(name: "get_flags", line: 508, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, file: !20, scope: !2, type: !8)
3737
!13 = !DILocation(line: 653, column: 5, scope: !14)
3838
!14 = distinct !DILexicalBlock(line: 652, column: 35, file: !20, scope: !15)
3939
!15 = distinct !DILexicalBlock(line: 616, column: 1, file: !20, scope: !1)

llvm/test/CodeGen/AMDGPU/llvm.dbg.value.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ attributes #1 = { nounwind readnone }
2424
!1 = !DIFile(filename: "/tmp/test_debug_value.cl", directory: "/Users/matt/src/llvm/build_debug")
2525
!2 = !{}
2626
!3 = !{!4}
27-
!4 = !DISubprogram(name: "test_debug_value", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: true, function: void (i32 addrspace(1)*)* @test_debug_value, variables: !9)
27+
!4 = distinct !DISubprogram(name: "test_debug_value", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: true, function: void (i32 addrspace(1)*)* @test_debug_value, variables: !9)
2828
!5 = !DISubroutineType(types: !6)
2929
!6 = !{null, !7}
3030
!7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !8, size: 64, align: 32)
@@ -34,4 +34,4 @@ attributes #1 = { nounwind readnone }
3434
!11 = !{i32 2, !"Dwarf Version", i32 4}
3535
!12 = !{i32 2, !"Debug Info Version", i32 3}
3636
!13 = !DIExpression()
37-
!14 = !DILocation(line: 1, column: 42, scope: !4)
37+
!14 = !DILocation(line: 1, column: 42, scope: !4)

llvm/test/CodeGen/ARM/2009-10-16-Scope.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ declare i32 @foo(i32) ssp
2424

2525
!0 = !DILocation(line: 5, column: 2, scope: !1)
2626
!1 = distinct !DILexicalBlock(line: 1, column: 1, file: null, scope: !2)
27-
!2 = !DISubprogram(name: "bar", linkageName: "bar", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scope: !3)
27+
!2 = distinct !DISubprogram(name: "bar", linkageName: "bar", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scope: !3)
2828
!3 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang 1.1", isOptimized: true, emissionKind: 0, file: !8, retainedTypes: !9)
2929
!4 = !DILocalVariable(name: "count_", line: 5, scope: !5, file: !3, type: !6)
3030
!5 = distinct !DILexicalBlock(line: 1, column: 1, file: null, scope: !1)

llvm/test/CodeGen/ARM/2010-04-15-ScavengerDebugValue.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnon
1515
!llvm.dbg.cu = !{!3}
1616
!llvm.module.flags = !{!15}
1717
!0 = !DILocalVariable(name: "b", line: 93, arg: 2, scope: !1, file: !2, type: !6)
18-
!1 = !DISubprogram(name: "__addvsi3", linkageName: "__addvsi3", line: 94, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !12, scope: null, type: !4)
18+
!1 = distinct !DISubprogram(name: "__addvsi3", linkageName: "__addvsi3", line: 94, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !12, scope: null, type: !4)
1919
!2 = !DIFile(filename: "libgcc2.c", directory: "/Users/bwilson/local/nightly/test-2010-04-14/build/llvmgcc.roots/llvmgcc~obj/src/gcc")
2020
!12 = !DIFile(filename: "libgcc2.c", directory: "/Users/bwilson/local/nightly/test-2010-04-14/build/llvmgcc.roots/llvmgcc~obj/src/gcc")
2121
!3 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build 00)", isOptimized: true, emissionKind: 0, file: !12, enums: !13, retainedTypes: !13, subprograms: !14)

llvm/test/CodeGen/ARM/2010-06-25-Thumb2ITInvalidIterator.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnon
4848
!llvm.dbg.gv = !{!14}
4949

5050
!0 = !DILocalVariable(name: "buf", line: 4, arg: 1, scope: !1, file: !2, type: !6)
51-
!1 = !DISubprogram(name: "x0", linkageName: "x0", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !26, scope: null, type: !4)
51+
!1 = distinct !DISubprogram(name: "x0", linkageName: "x0", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !26, scope: null, type: !4)
5252
!2 = !DIFile(filename: "t.c", directory: "/private/tmp")
5353
!3 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang 2.0", isOptimized: true, file: !26)
5454
!4 = !DISubroutineType(types: !5)

llvm/test/CodeGen/ARM/2010-08-04-StackVariable.ll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,11 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnon
9393
!13 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
9494
!14 = !DISubroutineType(types: !15)
9595
!15 = !{null, !12}
96-
!16 = !DISubprogram(name: "SVal", linkageName: "_ZN4SValC1Ev", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !48, scope: !1, type: !14, function: void (%struct.SVal*)* @_ZN4SValC1Ev)
97-
!17 = !DISubprogram(name: "foo", linkageName: "_Z3fooi4SVal", line: 16, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !48, scope: !2, type: !18, function: i32 (i32, %struct.SVal*)* @_Z3fooi4SVal)
96+
!16 = distinct !DISubprogram(name: "SVal", linkageName: "_ZN4SValC1Ev", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !48, scope: !1, type: !14, function: void (%struct.SVal*)* @_ZN4SValC1Ev)
97+
!17 = distinct !DISubprogram(name: "foo", linkageName: "_Z3fooi4SVal", line: 16, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !48, scope: !2, type: !18, function: i32 (i32, %struct.SVal*)* @_Z3fooi4SVal)
9898
!18 = !DISubroutineType(types: !19)
9999
!19 = !{!13, !13, !1}
100-
!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)
100+
!20 = distinct !DISubprogram(name: "main", linkageName: "main", line: 23, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !48, scope: !2, type: !21, function: i32 ()* @main)
101101
!21 = !DISubroutineType(types: !22)
102102
!22 = !{!13}
103103
!23 = !DILocalVariable(name: "i", line: 16, arg: 1, scope: !17, file: !2, type: !13)

0 commit comments

Comments
 (0)