diff options
author | Justin Bogner <mail@justinbogner.com> | 2017-02-17 23:57:42 +0000 |
---|---|---|
committer | Justin Bogner <mail@justinbogner.com> | 2017-02-17 23:57:42 +0000 |
commit | efc3fbf6a2015464d8f2773b7003f64190d17c31 (patch) | |
tree | 01c5161fecce6263076b13eb46eac99983ff3662 /llvm/test/Transforms | |
parent | 34b1fd6aaaf7e31ddcf65437ba8e274fe79bb7d2 (diff) | |
download | bcm5719-llvm-efc3fbf6a2015464d8f2773b7003f64190d17c31.tar.gz bcm5719-llvm-efc3fbf6a2015464d8f2773b7003f64190d17c31.zip |
Verifier: Disallow a line number without a file in DISubprogram
A line number doesn't make much sense if you don't say where it's
from. Add a verifier check for this and update some tests that had
bogus debug info.
llvm-svn: 295516
Diffstat (limited to 'llvm/test/Transforms')
-rw-r--r-- | llvm/test/Transforms/ArgumentPromotion/dbg.ll | 2 | ||||
-rw-r--r-- | llvm/test/Transforms/GlobalOpt/2009-03-05-dbg.ll | 2 | ||||
-rw-r--r-- | llvm/test/Transforms/SampleProfile/early-inline.ll | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/llvm/test/Transforms/ArgumentPromotion/dbg.ll b/llvm/test/Transforms/ArgumentPromotion/dbg.ll index 7dac3ad8415..61b7c1843e4 100644 --- a/llvm/test/Transforms/ArgumentPromotion/dbg.ll +++ b/llvm/test/Transforms/ArgumentPromotion/dbg.ll @@ -24,6 +24,6 @@ define void @caller(i32** %Y) { !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = !DILocation(line: 8, scope: !2) -!2 = distinct !DISubprogram(name: "test", line: 3, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !3, scopeLine: 3, scope: null) +!2 = distinct !DISubprogram(name: "test", file: !5, line: 3, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !3, scopeLine: 3, scope: null) !3 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: LineTablesOnly, file: !5) !5 = !DIFile(filename: "test.c", directory: "") diff --git a/llvm/test/Transforms/GlobalOpt/2009-03-05-dbg.ll b/llvm/test/Transforms/GlobalOpt/2009-03-05-dbg.ll index c785e13403c..da82b01560b 100644 --- a/llvm/test/Transforms/GlobalOpt/2009-03-05-dbg.ll +++ b/llvm/test/Transforms/GlobalOpt/2009-03-05-dbg.ll @@ -77,4 +77,4 @@ attributes #1 = { nounwind readnone } !6 = !{i32 2, !"Dwarf Version", i32 2} !7 = !{i32 2, !"Debug Info Version", i32 3} !8 = !DILocalVariable(name: "i", arg: 1, scope: !9, file: !3, line: 4, type: !5) -!9 = distinct !DISubprogram(name: "foo", linkageName: "foo", scope: !2, line: 4, type: !10, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !2)!10 = !DISubroutineType(types: !11)!11 = !{!5, !5}!12 = !DIExpression()!13 = !DILocation(line: 5, scope: !14)!14 = distinct !DILexicalBlock(scope: !9, file: !3)!15 = !DILocation(line: 6, scope: !14)!16 = !DILocation(line: 7, scope: !14)!17 = !DILocation(line: 9, scope: !14)!18 = !DILocation(line: 11, scope: !14)!19 = !DILocation(line: 14, scope: !20)!20 = distinct !DILexicalBlock(scope: !21, file: !3)!21 = distinct !DISubprogram(name: "bar", linkageName: "bar", scope: !2, line: 13, type: !22, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !2)!22 = !DISubroutineType(types: !23)!23 = !{!5}!24 = !DILocation(line: 15, scope: !20)!25 = !DILocation(line: 16, scope: !20)
\ No newline at end of file +!9 = distinct !DISubprogram(name: "foo", linkageName: "foo", scope: !2, file: !3, line: 4, type: !10, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !2)!10 = !DISubroutineType(types: !11)!11 = !{!5, !5}!12 = !DIExpression()!13 = !DILocation(line: 5, scope: !14)!14 = distinct !DILexicalBlock(scope: !9, file: !3)!15 = !DILocation(line: 6, scope: !14)!16 = !DILocation(line: 7, scope: !14)!17 = !DILocation(line: 9, scope: !14)!18 = !DILocation(line: 11, scope: !14)!19 = !DILocation(line: 14, scope: !20)!20 = distinct !DILexicalBlock(scope: !21, file: !3)!21 = distinct !DISubprogram(name: "bar", linkageName: "bar", scope: !2, file: !3, line: 13, type: !22, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !2)!22 = !DISubroutineType(types: !23)!23 = !{!5}!24 = !DILocation(line: 15, scope: !20)!25 = !DILocation(line: 16, scope: !20) diff --git a/llvm/test/Transforms/SampleProfile/early-inline.ll b/llvm/test/Transforms/SampleProfile/early-inline.ll index 780ff4751f4..51e7d243c18 100644 --- a/llvm/test/Transforms/SampleProfile/early-inline.ll +++ b/llvm/test/Transforms/SampleProfile/early-inline.ll @@ -41,8 +41,8 @@ declare i32 @__gxx_personality_v0(...) !1 = !DIFile(filename: "a", directory: "b/") !3 = !{i32 2, !"Dwarf Version", i32 4} !4 = !{i32 2, !"Debug Info Version", i32 3} -!6 = distinct !DISubprogram(linkageName: "_Z3foov", scope: !1, line: 5, scopeLine: 5, unit: !0) +!6 = distinct !DISubprogram(linkageName: "_Z3foov", scope: !1, file: !1, line: 5, scopeLine: 5, unit: !0) !9 = !DILocation(line: 6, column: 3, scope: !6) !10 = !DILocation(line: 8, column: 5, scope: !11) !11 = distinct !DILexicalBlock(scope: !6, file: !1, line: 7, column: 7) -!12 = distinct !DISubprogram(linkageName: "_ZL3barv", scope: !1, line: 20, scopeLine: 20, unit: !0) +!12 = distinct !DISubprogram(linkageName: "_ZL3barv", scope: !1, file: !1, line: 20, scopeLine: 20, unit: !0) |