summaryrefslogtreecommitdiffstats
path: root/llvm/test/Assembler/dicompileunit.ll
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2016-03-28 21:06:26 +0000
committerAdrian Prantl <aprantl@apple.com>2016-03-28 21:06:26 +0000
commitfaebbb053d4971a68d10df9a4f3d5db5aeed0afd (patch)
tree77cb00300206f881742871634dfc12bf33f5146c /llvm/test/Assembler/dicompileunit.ll
parent64fa75391cba60721f7b4d07e6fe6126b76809a5 (diff)
downloadbcm5719-llvm-faebbb053d4971a68d10df9a4f3d5db5aeed0afd.tar.gz
bcm5719-llvm-faebbb053d4971a68d10df9a4f3d5db5aeed0afd.zip
Add an IR Verifier check for orphaned DICompileUnits.
A DICompileUnit that is not listed in llvm.dbg.cu will cause assertion failures and/or crashes in the backend. The Verifier should reject this. rdar://problem/25369499 llvm-svn: 264657
Diffstat (limited to 'llvm/test/Assembler/dicompileunit.ll')
-rw-r--r--llvm/test/Assembler/dicompileunit.ll5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/test/Assembler/dicompileunit.ll b/llvm/test/Assembler/dicompileunit.ll
index 92fa61fe6b9..5826448e06f 100644
--- a/llvm/test/Assembler/dicompileunit.ll
+++ b/llvm/test/Assembler/dicompileunit.ll
@@ -1,8 +1,11 @@
; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis | FileCheck %s
; RUN: verify-uselistorder %s
+; Force a specific numbering.
; CHECK: !named = !{!0, !1, !2, !3, !4, !5, !6, !7, !8, !9}
!named = !{!0, !1, !2, !3, !4, !5, !6, !7, !8, !9}
+; CHECK: !llvm.dbg.cu = !{!8, !9}
+!llvm.dbg.cu = !{!8, !9}
!0 = distinct !{}
!1 = !DIFile(filename: "path/to/file", directory: "/path/to/dir")
@@ -24,3 +27,5 @@
!9 = distinct !DICompileUnit(language: 12, file: !1, producer: "",
isOptimized: false, flags: "", runtimeVersion: 0,
splitDebugFilename: "", emissionKind: 0)
+!llvm.module.flags = !{!10}
+!10 = !{i32 2, !"Debug Info Version", i32 3}
OpenPOWER on IntegriCloud