1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
llvm-mirror/test/Verifier/metadata-function-dbg.ll
Peter Collingbourne 232f184d9b IR: Allow multiple global metadata attachments with the same type.
This will be necessary to allow the global merge pass to attach
multiple debug info metadata nodes to global variables once we reverse
the edge from DIGlobalVariable to GlobalVariable.

Differential Revision: http://reviews.llvm.org/D20414

llvm-svn: 271358
2016-06-01 01:17:57 +00:00

28 lines
696 B
LLVM

; RUN: not llvm-as %s -disable-output 2>&1 | FileCheck %s
define void @foo() !dbg !4 {
unreachable
}
; CHECK: function must have a single !dbg attachment
define void @foo2() !dbg !4 !dbg !4 {
unreachable
}
; CHECK-NOT: !dbg
; CHECK: function !dbg attachment must be a subprogram
; CHECK-NEXT: void ()* @bar
; CHECK-NEXT: !{{[0-9]+}} = !{}
define void @bar() !dbg !6 {
unreachable
}
!llvm.module.flags = !{!0}
!0 = !{i32 2, !"Debug Info Version", i32 3}
!llvm.dbg.cu = !{!1}
!1 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2)
!2 = !DIFile(filename: "t.c", directory: "/path/to/dir")
!4 = distinct !DISubprogram(name: "foo", scope: !1, file: !2, unit: !1)
!6 = !{}