1 ; RUN: opt -S -deadargelim < %s | FileCheck %s 2 target triple = "x86_64-pc-windows-msvc" 3 4 define internal void @callee(i8*) { 5 entry: 6 call void @thunk() 7 ret void 8 } 9 10 define void @test1() personality i32 (...)* @__CxxFrameHandler3 { 11 entry: 12 invoke void @thunk() 13 to label %good1 unwind label %bad1 14 15 good1: ; preds = %entry-block 16 ret void 17 18 bad1: ; preds = %entry-block 19 %pad1 = cleanuppad within none [] 20 call void @callee(i8* null) [ "funclet"(token %pad1) ] 21 cleanupret from %pad1 unwind to caller 22 } 23 ; CHECK-LABEL: define void @test1( 24 ; CHECK: %[[pad:.*]] = cleanuppad within none [] 25 ; CHECK-NEXT: call void @callee() [ "funclet"(token %[[pad]]) ] 26 27 declare void @thunk() 28 29 declare i32 @__CxxFrameHandler3(...) 30