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/Verifier | |
| 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/Verifier')
| -rw-r--r-- | llvm/test/Verifier/dbg-line-without-file.ll | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/llvm/test/Verifier/dbg-line-without-file.ll b/llvm/test/Verifier/dbg-line-without-file.ll new file mode 100644 index 00000000000..4d5725959ef --- /dev/null +++ b/llvm/test/Verifier/dbg-line-without-file.ll @@ -0,0 +1,15 @@ +; RUN: not llvm-as -disable-output <%s 2>&1 | FileCheck %s +; CHECK: assembly parsed, but does not verify +; CHECK: line specified with no file + +define void @foo() !dbg !3 { + ret void +} + +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_C, file: !2) +!2 = !DIFile(filename: "foo.c", directory: "") +!3 = distinct !DISubprogram(name: "foo", scope: !1, line: 1, unit: !1) |

