p9-noexcept.cpp revision 66b22771fc0a1dba598e50469f2961048e7edd55
1// RUN: %clang_cc1 %s -std=c++11 -triple=x86_64-apple-darwin10 -emit-llvm -o - -fcxx-exceptions -fexceptions | FileCheck %s
2
3void external();
4
5void target() noexcept
6{
7  // CHECK: invoke void @_Z8externalv()
8  external();
9}
10// CHECK:      [[T0:%.*]] = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
11// CHECK-NEXT:  catch i8* null
12// CHECK-NEXT: [[T1:%.*]] = extractvalue { i8*, i32 } [[T0]], 0
13// CHECK-NEXT: call void @__clang_call_terminate(i8* [[T1]]) noreturn nounwind
14// CHECK-NEXT: unreachable
15
16void reverse() noexcept(false)
17{
18  // CHECK: call void @_Z8externalv()
19  external();
20}
21