1// RUN: %clang_cc1 %s -emit-llvm -o - -triple x86_64-darwin-apple -fobjc-arc \
2// RUN:   -fexceptions -fcxx-exceptions | FileCheck %s
3
4// Check that no EH cleanup is emitted around the call to __os_log_helper.
5namespace no_eh_cleanup {
6  void release(int *lock);
7
8  // CHECK-LABEL: define {{.*}} @_ZN13no_eh_cleanup3logERiPcS1_(
9  // CHECK: call void @__os_log_helper_1_2_2_4_0_8_34(
10
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);
14  }
15
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]+]]
18}
19
20// CHECK: attributes [[NUW]] = { {{.*}}nounwind
21