blob: c660d145393a16ddbb58efca3dbd4168b295bcb5 [file] [log] [blame]
David Majnemer2ae61ee2016-02-22 17:22:01 +00001// RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-pc-win32 -fexceptions -fcxx-exceptions -fexternc-nounwind | FileCheck %s
2
3namespace test1 {
4struct Cleanup { ~Cleanup(); };
5extern "C" void never_throws();
6void may_throw();
7
8void caller() {
9 Cleanup x;
10 never_throws();
11 may_throw();
12}
13}
14// CHECK-LABEL: define void @"\01?caller@test1@@YAXXZ"(
15// CHECK: call void @never_throws(
16// CHECK: invoke void @"\01?may_throw@test1@@YAXXZ"(
David Majnemercd5855e2016-02-29 01:40:36 +000017
18namespace test2 {
19struct Cleanup { ~Cleanup(); };
20extern "C" void throws_int() throw(int);
21void may_throw();
22
23void caller() {
24 Cleanup x;
25 throws_int();
26 may_throw();
27}
28}
29// CHECK-LABEL: define void @"\01?caller@test2@@YAXXZ"(
30// CHECK: invoke void @throws_int(
31// CHECK: invoke void @"\01?may_throw@test2@@YAXXZ"(