• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt -S -x86-winehstate < %s | FileCheck %s --check-prefix=IR
2; RUN: llc < %s | FileCheck %s --check-prefix=ASM
3
4; IR-NOT: define.*__ehhandler
5; IR: define available_externally void @foo(void ()*)
6; IR-NOT: define.*__ehhandler
7
8; No code should be emitted.
9; ASM-NOT: __ehtable
10; ASM-NOT: __ehhandler
11
12target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
13target triple = "i686-pc-windows-msvc"
14
15declare i32 @__CxxFrameHandler3(...) unnamed_addr
16
17define available_externally void @foo(void ()*) personality i32 (...)* @__CxxFrameHandler3 {
18start:
19  invoke void %0()
20          to label %good unwind label %bad
21
22good:                                             ; preds = %start
23  ret void
24
25bad:                                              ; preds = %start
26  %cleanuppad = cleanuppad within none []
27  cleanupret from %cleanuppad unwind to caller
28}
29