mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 05:01:59 +01:00
232f184d9b
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
28 lines
696 B
LLVM
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 = !{}
|