Support: Stop using iplist in Recycler
[oota-llvm.git] / test / CodeGen / X86 / cppeh-nounwind.ll
1 ; RUN: llc -mtriple=i686-pc-windows-msvc < %s | FileCheck %s
2
3 ; Sometimes invokes of nounwind functions make it through to CodeGen, especially
4 ; at -O0, where Clang sometimes optimistically annotates functions as nounwind.
5 ; WinEHPrepare ends up outlining functions, and emitting references to LSDA
6 ; labels. Make sure we emit the LSDA in that case.
7
8 declare i32 @__CxxFrameHandler3(...)
9 declare void @nounwind_func() nounwind
10 declare void @cleanup()
11
12 define void @should_emit_tables() personality i32 (...)* @__CxxFrameHandler3 {
13 entry:
14   invoke void @nounwind_func()
15       to label %done unwind label %lpad
16
17 done:
18   ret void
19
20 lpad:
21   %vals = landingpad { i8*, i32 }
22       cleanup
23   call void @cleanup()
24   resume { i8*, i32 } %vals
25 }
26
27 ; CHECK: _should_emit_tables:
28 ; CHECK: calll _nounwind_func
29 ; CHECK: retl
30
31 ; CHECK: L__ehtable$should_emit_tables:
32
33 ; CHECK: ___ehhandler$should_emit_tables:
34 ; CHECK: movl $L__ehtable$should_emit_tables, %eax
35 ; CHECK: jmp ___CxxFrameHandler3 # TAILCALL