68 lines · plain
1; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis | FileCheck --check-prefix=CHECK --check-prefix=CHECK-UNMAT %s2; RUN: llvm-as < %s | llvm-dis -materialize-metadata | FileCheck --check-prefix=CHECK-UNMAT %s3; RUN: verify-uselistorder %s4 5; CHECK-UNMAT: @global = global i32 0, !foo [[M2:![0-9]+]], !foo [[M3:![0-9]+]], !baz [[M3]]6@global = global i32 0, !foo !2, !foo !3, !baz !37 8; CHECK-UNMAT: @ifunc_func = ifunc void (...), ptr @resolver, !foo [[M2]]9@ifunc_func = ifunc void (...), ptr @resolver, !foo !210 11define internal ptr @resolver() {12entry:13 ret ptr @test14}15 16; CHECK-LABEL: @test17; CHECK: ret void, !foo [[M0:![0-9]+]], !bar [[M1:![0-9]+]]18define void @test() !dbg !1 {19 add i32 2, 1, !bar !020 add i32 1, 2, !foo !121 call void @llvm.dbg.func.start(metadata !"foo")22 extractvalue {{i32, i32}, i32} undef, 0, 1, !foo !023 ret void, !foo !0, !bar !124}25 26; CHECK: define void @test2() !foo [[M2]] !baz [[M3]]27define void @test2() !foo !2 !baz !3 {28 unreachable29}30 31; CHECK: define void @test3() !bar [[M3]]32; CHECK: unreachable, !bar [[M4:![0-9]+]]33define void @test3() !bar !3 {34 unreachable, !bar !435}36 37; CHECK-LABEL: define void @test_attachment_name() {38; CHECK: unreachable, !\342abc [[M4]]39define void @test_attachment_name() {40 ;; Escape the first character when printing text IR, since it's a digit41 unreachable, !\34\32abc !442}43 44; CHECK-UNMAT: [[M2]] = distinct !{}45; CHECK-UNMAT: [[M3]] = distinct !{}46; CHECK: [[M0]] = !DILocation47; CHECK: [[M1]] = distinct !DISubprogram48; CHECK: [[M4]] = distinct !{}49 50!llvm.module.flags = !{!7}51!llvm.dbg.cu = !{!5}52!0 = !DILocation(line: 662302, column: 26, scope: !1)53!1 = distinct !DISubprogram(name: "foo", isDefinition: true, unit: !5)54!2 = distinct !{}55!3 = distinct !{}56!4 = distinct !{}57!5 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang",58 file: !6,59 isOptimized: true, flags: "-O2",60 splitDebugFilename: "abc.debug", emissionKind: 2)61!6 = !DIFile(filename: "path/to/file", directory: "/path/to/dir")62!7 = !{i32 2, !"Debug Info Version", i32 3}63 64declare void @llvm.dbg.func.start(metadata) nounwind readnone65 66!foo = !{ !0 }67!bar = !{ !1 }68