1# RUN: llc -mtriple=aarch64 -run-pass=patchable-function %s -o - | FileCheck %s 2 3# CHECK: name: empty 4# CHECK: bb.0.entry 5# CHECK: PATCHABLE_FUNCTION_ENTER debug-location !DILocation(line: 1, 6# CHECK-NEXT: RET undef $lr, debug-location !DILocation(line: 1, 7 8## Empty entry MBB, no debug location. 9# CHECK: name: empty_entry 10# CHECK: bb.0.entry 11# CHECK: PATCHABLE_FUNCTION_ENTER{{$}} 12# CHECK: bb.1.here 13 14--- | 15 define void @empty() #0 !dbg !7 { 16 entry: 17 ret void, !dbg !10 18 } 19 20 define void @empty_entry() #0 !dbg !11 { 21 entry: 22 br label %here 23 here: 24 ret void, !dbg !12 25 } 26 27 attributes #0 = { "patchable-function-entry"="1" } 28 !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 11.0.0 ", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, splitDebugInlining: false, nameTableKind: None) 29 !1 = !DIFile(filename: "a.c", directory: "/tmp") 30 !2 = !{} 31 !3 = !{i32 7, !"Dwarf Version", i32 4} 32 !4 = !{i32 2, !"Debug Info Version", i32 3} 33 !5 = !{i32 1, !"wchar_size", i32 4} 34 !6 = !{!"clang version 11.0.0 "} 35 !7 = distinct !DISubprogram(name: "empty", scope: !1, file: !1, line: 1, type: !8, scopeLine: 1, flags: DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !2) 36 !8 = !DISubroutineType(types: !9) 37 !9 = !{null} 38 !10 = !DILocation(line: 1, column: 61, scope: !7) 39 !11 = distinct !DISubprogram(name: "empty_entry", scope: !1, file: !1, line: 2, type: !8, scopeLine: 2, flags: DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !2) 40 !12 = !DILocation(line: 2, column: 61, scope: !11) 41 42... 43--- 44name: empty 45alignment: 4 46tracksRegLiveness: true 47body: | 48 bb.0.entry: 49 liveins: $lr 50 RET undef $lr, debug-location !10 51 52... 53--- 54name: empty_entry 55alignment: 4 56tracksRegLiveness: true 57body: | 58 bb.0.entry: 59 liveins: $lr 60 bb.1.here: 61 liveins: $lr 62 RET undef $lr, debug-location !12 63 64... 65