1 // RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-pc-win32 -mconstructor-aliases -fcxx-exceptions -fexceptions -fno-rtti -DTRY   | FileCheck %s -check-prefix=TRY
2 // RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-pc-win32 -mconstructor-aliases -fcxx-exceptions -fexceptions -fno-rtti -DTHROW | FileCheck %s -check-prefix=THROW
3 
4 void external();
5 
6 inline void not_emitted() {
7   throw int(13); // no error
8 }
9 
10 int main() {
11   int rv = 0;
12 #ifdef TRY
13   try {
14     external(); // TRY: invoke void @"\01?external@@YAXXZ"
15   } catch (int) {
16     rv = 1;
17     // TRY: call void @llvm.eh.begincatch(i8* %{{.*}}, i8* %{{.*}})
18     // TRY: call void @llvm.eh.endcatch()
19   }
20 #endif
21 #ifdef THROW
22   // THROW: call void @"\01?terminate@@YAXXZ"
23   throw int(42);
24 #endif
25   return rv;
26 }
27