Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
clang/test/CXX/except/except.spec/p9-dynamic.cpp
// RUN: %clang_cc1 %std_cxx98-14 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - -fcxx-exceptions -fexceptions | FileCheck %s --check-prefixes=CHECK,CHECK-PRE17 | // RUN: %clang_cc1 %std_cxx98-14 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - -fcxx-exceptions -fexceptions | FileCheck %s --check-prefixes=CHECK,CHECK-PRE17 | ||||
// RUN: %clang_cc1 %std_cxx17- %s -triple=x86_64-apple-darwin10 -Wno-dynamic-exception-spec -emit-llvm -o - -fcxx-exceptions -fexceptions | FileCheck %s --check-prefixes=CHECK,CHECK-17 | // RUN: %clang_cc1 %std_cxx17- %s -triple=x86_64-apple-darwin10 -Wno-dynamic-exception-spec -emit-llvm -o - -fcxx-exceptions -fexceptions | FileCheck %s --check-prefixes=CHECK,CHECK-17 | ||||
void external(); | void external(); | ||||
// CHECK-LABEL: _Z6targetv( | // CHECK-LABEL: _Z6targetv( | ||||
// CHECK: invoke void @_Z8externalv() | // CHECK: invoke void @_Z8externalv() | ||||
// CHECK: landingpad { ptr, i32 } | // CHECK: landingpad { ptr, i32 } | ||||
// CHECK-NEXT: filter [1 x ptr] [ptr @_ZTIi] | // CHECK-NEXT: filter [1 x ptr] [ptr @_ZTIi] | ||||
// CHECK: call void @__cxa_call_unexpected | // CHECK: call void @__cxa_call_unexpected | ||||
void target() throw(int) | void target() throw(int) | ||||
{ | { | ||||
external(); | external(); | ||||
} | } | ||||
// CHECK-LABEL: _Z7target2v( | // CHECK-LABEL: _Z7target2v( | ||||
// CHECK: invoke void @_Z8externalv() | // CHECK-PRE17: invoke void @_Z8externalv() | ||||
// CHECK: landingpad { ptr, i32 } | // CHECK-PRE17: landingpad { ptr, i32 } | ||||
// CHECK-PRE17-NEXT: filter [0 x ptr] zeroinitializer | // CHECK-PRE17-NEXT: filter [0 x ptr] zeroinitializer | ||||
// CHECK-17-NEXT: catch ptr null | |||||
// CHECK-PRE17: call void @__cxa_call_unexpected | // CHECK-PRE17: call void @__cxa_call_unexpected | ||||
// CHECK-17: call void @__clang_call_terminate | // CHECK-17: call unwindabort void @_Z8externalv() | ||||
void target2() throw() | void target2() throw() | ||||
{ | { | ||||
external(); | external(); | ||||
} | } |