1 ; RUN: opt -S -argpromotion < %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 %out unwind label %cpad 14 15 out: 16 ret void 17 18 cpad: 19 %pad = cleanuppad within none [] 20 call void @callee(i8* null) [ "funclet"(token %pad) ] 21 cleanupret from %pad unwind to caller 22 } 23 24 ; CHECK-LABEL: define void @test1( 25 ; CHECK: %[[pad:.*]] = cleanuppad within none [] 26 ; CHECK-NEXT: call void @callee() [ "funclet"(token %[[pad]]) ] 27 ; CHECK-NEXT: cleanupret from %[[pad]] unwind to caller 28 29 declare void @thunk() 30 31 declare i32 @__CxxFrameHandler3(...) 32