diff options
author | Davide Italiano <davide@freebsd.org> | 2017-09-24 01:06:35 +0000 |
---|---|---|
committer | Davide Italiano <davide@freebsd.org> | 2017-09-24 01:06:35 +0000 |
commit | 212211915096b22f5dfa32cc554aadaf17fb8ba4 (patch) | |
tree | 26c7cbe4c6f2dce7d7022662e838cbaff905e1ba /llvm/test/DebugInfo/pr34672.ll | |
parent | 026727f861c8187c92aa1eb7598691029f64fe33 (diff) | |
download | bcm5719-llvm-212211915096b22f5dfa32cc554aadaf17fb8ba4.tar.gz bcm5719-llvm-212211915096b22f5dfa32cc554aadaf17fb8ba4.zip |
[Verifier] Stop accepting broken DIGlobalVariable(s).
The code wasn't yelling at the user when there's a reference
from a DIGlobalVariableExpression. Thanks to Adrian for the
reduced testcase. Fixes PR34672.
llvm-svn: 314069
Diffstat (limited to 'llvm/test/DebugInfo/pr34672.ll')
-rw-r--r-- | llvm/test/DebugInfo/pr34672.ll | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/test/DebugInfo/pr34672.ll b/llvm/test/DebugInfo/pr34672.ll new file mode 100644 index 00000000000..49be0e3351c --- /dev/null +++ b/llvm/test/DebugInfo/pr34672.ll @@ -0,0 +1,16 @@ +; RUN: not opt -verify %s 2>&1 | FileCheck %s +; CHECK: invalid type ref +; CHECK-NOT: invalid type ref + +@global = common global i32 0, align 4, !dbg !2 + +!llvm.dbg.cu = !{!0} +!llvm.module.flags = !{!5, !6} + +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "adrian", emissionKind: FullDebug) +!1 = !DIFile(filename: "broken.c", directory: "/") +!2 = !DIGlobalVariableExpression(var: !3, expr: !DIExpression()) +!3 = !DIGlobalVariable(name: "g", scope: !0, file: !1, line: 1, type: !1, isLocal: false, isDefinition: true) +!5 = !{i32 2, !"Dwarf Version", i32 4} +!6 = !{i32 1, !"Debug Info Version", i32 3} + |