llvm-6502/test/Verifier/dbg.ll
Duncan P. N. Exon Smith d94d5bbbf9 Verifier: Check that !dbg attachments have the right type
A WIP patch makes `DIDescriptor` accessors more strict, which in turn
causes the `DebugInfoFinder` to crash on wrongly typed `!dbg`
attachments.  Catch that error up front in
`Verifier::visitInstruction()`.

Also remove a test that we "handle" invalid `!dbg` attachments, added
back in r99938.  We don't want to handle those anymore.

Note: I'm *not* recursing and verifying the debug info graph reachable
from this node; that work is already done by `verifyDebugInfo()`.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232834 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-20 19:26:58 +00:00

13 lines
293 B
LLVM

; RUN: not llvm-as -disable-output <%s 2>&1 | FileCheck %s
define void @foo() {
ret void, !dbg !{}
}
; CHECK: invalid !dbg metadata attachment
; CHECK-NEXT: ret void, !dbg ![[LOC:[0-9]+]]
; CHECK-NEXT: ![[LOC]] = !{}
!llvm.module.flags = !{!0}
!0 = !{i32 2, !"Debug Info Version", i32 3}