metadata.ll 1.0 KB

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