1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
llvm-mirror/test/Verifier/dbg.ll
Duncan P. N. Exon Smith 502d48a1fb 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()`.

llvm-svn: 232834
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}