1 ; RUN: opt -S -x86-winehstate < %s | FileCheck %s --check-prefix=IR
2 ; RUN: llc < %s | FileCheck %s --check-prefix=ASM
4 ; IR-NOT: define.*__ehhandler
5 ; IR: define available_externally void @foo(void ()* %0)
6 ; IR-NOT: define.*__ehhandler
8 ; No code should be emitted.
10 ; ASM-NOT: __ehhandler
12 target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
13 target triple = "i686-pc-windows-msvc"
15 declare i32 @__CxxFrameHandler3(...) unnamed_addr
17 define available_externally void @foo(void ()*) personality i32 (...)* @__CxxFrameHandler3 {
20 to label %good unwind label %bad
22 good: ; preds = %start
26 %cleanuppad = cleanuppad within none []
27 cleanupret from %cleanuppad unwind to caller