llvm/test/Verifier/dbg-orphaned-compileunit.ll
Adrian Prantl 8d4b7e74e1 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264657 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-28 21:06:26 +00:00

11 lines
395 B
LLVM

; RUN: not llvm-as -disable-output <%s 2>&1 | FileCheck %s
; CHECK: assembly parsed, but does not verify
; CHECK-NEXT: All DICompileUnits must be listed in llvm.dbg.cu
!named = !{!1}
!llvm.module.flags = !{!0}
!0 = !{i32 2, !"Debug Info Version", i32 3}
!llvm.dbg.cu = !{}
!1 = distinct !DICompileUnit(file: !2, language: DW_LANG_Fortran77)
!2 = !DIFile(filename: "test.f", directory: "")