• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis | FileCheck %s
2; RUN: verify-uselistorder %s
3
4; CHECK-LABEL: @test
5; CHECK: ret void, !bar !1, !foo !0
6define void @test() {
7  add i32 2, 1, !bar !0
8  add i32 1, 2, !foo !1
9  call void @llvm.dbg.func.start(metadata !"foo")
10  extractvalue {{i32, i32}, i32} undef, 0, 1, !foo !0
11  ret void, !foo !0, !bar !1
12}
13
14; CHECK-LABEL: define void @test2() !foo !2 !baz !3
15define void @test2() !foo !2 !baz !3 {
16  unreachable
17}
18
19; CHECK-LABEL: define void @test3() !bar !3
20; CHECK: unreachable, !bar !4
21define void @test3() !bar !3 {
22  unreachable, !bar !4
23}
24
25; CHECK-LABEL: define void @test_attachment_name() {
26; CHECK:   unreachable, !\342abc !4
27define void @test_attachment_name() {
28  ;; Escape the first character when printing text IR, since it's a digit
29  unreachable, !\34\32abc !4
30}
31
32!0 = !DILocation(line: 662302, column: 26, scope: !1)
33!1 = distinct !DISubprogram(name: "foo")
34!2 = distinct !{}
35!3 = distinct !{}
36!4 = distinct !{}
37
38declare void @llvm.dbg.func.start(metadata) nounwind readnone
39
40!foo = !{ !0 }
41!bar = !{ !1 }
42