llvm/test/Verifier/dbg-difile-crash.ll
Davide Italiano fd0bc4ee66 [IRVerifier] Don't crash on invalid DIFile inside DISubprogram.
r265515, this time with the correct fix. file inside DISubprogram is not
mandatory.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265586 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-06 18:46:39 +00:00

11 lines
424 B
LLVM

; RUN: not llvm-as -disable-output <%s 2>&1 | FileCheck %s
; CHECK: assembly parsed, but does not verify
; CHECK-NEXT: invalid file
!llvm.module.flags = !{!0}
!0 = !{i32 2, !"Debug Info Version", i32 3}
!llvm.dbg.cu = !{!1}
!1 = distinct !DICompileUnit(file: !2, language: DW_LANG_C99, subprograms: !{!3})
!2 = !DIFile(filename: "file.c", directory: "/path/to/dir")
!3 = distinct !DISubprogram(name: "blah", file: !1)