1 // RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - -fcxx-exceptions -fexceptions | FileCheck %s --check-prefixes=CHECK,CHECK-PRE17 2 // RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -std=c++17 -Wno-dynamic-exception-spec -emit-llvm -o - -fcxx-exceptions -fexceptions | FileCheck %s --check-prefixes=CHECK,CHECK-17 3 4 void external(); 5 6 // CHECK-LABEL: _Z6targetv( 7 // CHECK: invoke void @_Z8externalv() 8 // CHECK: landingpad { i8*, i32 } 9 // CHECK-NEXT: filter [1 x i8*] [i8* bitcast (i8** @_ZTIi to i8*)] 10 // CHECK: call void @__cxa_call_unexpected 11 void target() throw(int) 12 { 13 external(); 14 } 15 16 // CHECK-LABEL: _Z7target2v( 17 // CHECK: invoke void @_Z8externalv() 18 // CHECK: landingpad { i8*, i32 } 19 // CHECK-PRE17-NEXT: filter [0 x i8*] zeroinitializer 20 // CHECK-17-NEXT: catch i8* null 21 // CHECK-PRE17: call void @__cxa_call_unexpected 22 // CHECK-17: call void @__clang_call_terminate 23 void target2() throw() 24 { 25 external(); 26 } 27