1 ; RUN: llc < %s | FileCheck %s 2 3 target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128" 4 target triple = "x86_64-pc-windows-msvc" 5 6 ; This test case is equivalent to: 7 ; extern "C" void may_throw(); 8 ; extern "C" void test_catch_all() { 9 ; try { 10 ; may_throw(); 11 ; } catch (...) { 12 ; } 13 ; } 14 15 declare void @may_throw() #1 16 declare i32 @__CxxFrameHandler3(...) 17 declare void @llvm.eh.begincatch(i8* nocapture, i8* nocapture) #2 18 declare void @llvm.eh.endcatch() #2 19 20 ; Function Attrs: nounwind uwtable 21 define void @test_catch_all() #0 { 22 entry: 23 invoke void @may_throw() 24 to label %try.cont unwind label %lpad 25 26 lpad: ; preds = %entry 27 %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) 28 catch i8* null 29 %1 = extractvalue { i8*, i32 } %0, 0 30 tail call void @llvm.eh.begincatch(i8* %1, i8* null) #2 31 tail call void @llvm.eh.endcatch() #2 32 br label %try.cont 33 34 try.cont: ; preds = %entry, %lpad 35 ret void 36 } 37 38 ; CHECK-LABEL: $handlerMap$0$test_catch_all: 39 ; CHECK: .long {{[0-9]+}} 40 ; CHECK: .long 0 41 ; CHECK: .long 0 42 ; CHECK: .long test_catch_all.catch@IMGREL 43 ; CHECK: .long .Ltest_catch_all.catch$parent_frame_offset 44 45 attributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "unsafe-fp-math"="false" "use-soft-float"="false" } 46 attributes #1 = { "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "unsafe-fp-math"="false" "use-soft-float"="false" } 47 attributes #2 = { nounwind } 48