1 // RUN: %clang_cc1 %s -emit-llvm -triple i686-windows-msvc -o - | FileCheck %s
3 // Statement allow the user to exit the evaluation scope of a CallExpr without
4 // executing the call. Check that clang generates reasonable IR for that case.
6 // Not trivially copyable, subject to inalloca.
13 void inalloca(Foo x
, Foo y
);
15 // PR25102: In this case, clang attempts to clean up unreachable blocks *during*
16 // IR generation. inalloca defers some RAUW operations to the end of codegen,
17 // and those references would become stale when the unreachable call to
18 // 'inalloca' got deleted.
19 extern "C" void pr25102() {
27 // CHECK-LABEL: define dso_local void @pr25102()
28 // CHECK: br label %out
33 extern "C" void seqAbort() {
42 // FIXME: This can cause a stack leak. We should really have a "normal" cleanup
43 // that goto branches through.
44 // CHECK-LABEL: define dso_local void @seqAbort()
45 // CHECK: alloca inalloca <{ %struct.Foo, %struct.Foo }>
46 // CHECK: call noundef zeroext i1 @"?cond@@YA_NXZ"()
48 // CHECK: br label %out
49 // CHECK: call void @"?inalloca@@YAXUFoo@@0@Z"(ptr inalloca(<{ %struct.Foo, %struct.Foo }>) %{{.*}})
50 // CHECK: call void @llvm.stackrestore.p0(ptr %inalloca.save)