86 lines · plain
1; RUN: llc < %s | FileCheck %s2 3; C++ source:4; void g();5; void f() {6; try {7; g();8; } catch (...) {9; g();10; }11; }12 13; CHECK: "?f@@YAXXZ": # @"\01?f@@YAXXZ"14; CHECK: .cv_fpo_proc "?f@@YAXXZ" 015; CHECK: pushl %ebp16; CHECK: .cv_fpo_pushreg %ebp17; CHECK: movl %esp, %ebp18; CHECK: .cv_fpo_setframe %ebp19; ...20; CHECK: .cv_fpo_endprologue21; CHECK: retl22 23; No FPO directives in the catchpad for now.24; CHECK: "?catch$2@?0??f@@YAXXZ@4HA":25; CHECK-NOT: .cv_fpo26; CHECK: retl # CATCHRET27; FIXME: This endproc is for the parent function. To get FPO data for28; funclets we'd have to emit it first so the scopes don't nest.29; CHECK: .cv_fpo_endproc30 31; CHECK-NOT: .cv_fpo_data32; CHECK: .cv_fpo_data "?f@@YAXXZ"33; CHECK-NOT: .cv_fpo_data34 35; ModuleID = 't.cpp'36source_filename = "t.cpp"37target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"38target triple = "i386-pc-windows-msvc19.11.25508"39 40define void @"\01?f@@YAXXZ"() local_unnamed_addr #0 personality ptr @__CxxFrameHandler3 !dbg !8 {41entry:42 invoke void @"\01?g@@YAXXZ"()43 to label %try.cont unwind label %catch.dispatch, !dbg !1144 45catch.dispatch: ; preds = %entry46 %0 = catchswitch within none [label %catch] unwind to caller, !dbg !1347 48catch: ; preds = %catch.dispatch49 %1 = catchpad within %0 [ptr null, i32 64, ptr null], !dbg !1350 call void @"\01?g@@YAXXZ"() [ "funclet"(token %1) ], !dbg !1451 catchret from %1 to label %try.cont, !dbg !1652 53try.cont: ; preds = %entry, %catch54 ret void, !dbg !1755}56 57declare void @"\01?g@@YAXXZ"() local_unnamed_addr #158 59declare i32 @__CxxFrameHandler3(...)60 61attributes #0 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="non-leaf" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="pentium4" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "use-soft-float"="false" }62attributes #1 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="pentium4" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "use-soft-float"="false" }63 64!llvm.dbg.cu = !{!0}65!llvm.module.flags = !{!3, !4, !5, !6}66!llvm.ident = !{!7}67 68!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 6.0.0 ", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)69!1 = !DIFile(filename: "t.cpp", directory: "C:\5Csrc\5Cllvm-project\5Cbuild", checksumkind: CSK_MD5, checksum: "1e688e4021b6626d049b9899f9d53a2a")70!2 = !{}71!3 = !{i32 1, !"NumRegisterParameters", i32 0}72!4 = !{i32 2, !"CodeView", i32 1}73!5 = !{i32 2, !"Debug Info Version", i32 3}74!6 = !{i32 1, !"wchar_size", i32 2}75!7 = !{!"clang version 6.0.0 "}76!8 = distinct !DISubprogram(name: "f", linkageName: "\01?f@@YAXXZ", scope: !1, file: !1, line: 2, type: !9, isLocal: false, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: true, unit: !0, retainedNodes: !2)77!9 = !DISubroutineType(types: !10)78!10 = !{null}79!11 = !DILocation(line: 4, column: 5, scope: !12)80!12 = distinct !DILexicalBlock(scope: !8, file: !1, line: 3, column: 7)81!13 = !DILocation(line: 5, column: 3, scope: !12)82!14 = !DILocation(line: 6, column: 5, scope: !15)83!15 = distinct !DILexicalBlock(scope: !8, file: !1, line: 5, column: 17)84!16 = !DILocation(line: 7, column: 3, scope: !15)85!17 = !DILocation(line: 8, column: 1, scope: !8)86