1 // RUN: %clang_cc1 %s -emit-llvm -o - -triple x86_64-darwin-apple -fobjc-arc \
2 // RUN: -fexceptions -fcxx-exceptions | FileCheck %s
4 // Check that no EH cleanup is emitted around the call to __os_log_helper.
5 namespace no_eh_cleanup {
6 void release(int *lock);
8 // CHECK-LABEL: define {{.*}} @_ZN13no_eh_cleanup3logERiPcS1_(
9 // CHECK: call void @__os_log_helper_1_2_2_4_0_8_34(
11 void log(int &i, char *data, char *buf) {
12 int lock __attribute__((cleanup(release)));
13 __builtin_os_log_format(buf, "%d %{public}s", i, data);
16 // Check that the os_log_helper is marked `nounwind`.
17 // CHECK: define {{.*}} @__os_log_helper_1_2_2_4_0_8_34({{.*}} [[NUW:#[0-9]+]]
20 // CHECK: attributes [[NUW]] = { {{.*}}nounwind