150
|
1 // RUN: %clang_cc1 %s -emit-llvm -o - -triple x86_64-darwin-apple -fobjc-arc \
|
|
2 // RUN: -fexceptions -fcxx-exceptions -O1 -fno-experimental-new-pass-manager | FileCheck %s
|
|
3 // RUN: %clang_cc1 %s -emit-llvm -o - -triple x86_64-darwin-apple -fobjc-arc \
|
|
4 // RUN: -fexceptions -fcxx-exceptions -O1 -fexperimental-new-pass-manager -fno-inline | FileCheck %s
|
|
5
|
|
6 // Check that no EH cleanup is emitted around the call to __os_log_helper.
|
|
7 namespace no_eh_cleanup {
|
|
8 void release(int *lock);
|
|
9
|
|
10 // CHECK-LABEL: define {{.*}} @_ZN13no_eh_cleanup3logERiPcS1_(
|
|
11 void log(int &i, char *data, char *buf) {
|
|
12 int lock __attribute__((cleanup(release)));
|
|
13 // CHECK: call void @__os_log_helper_1_2_2_4_0_8_34(
|
|
14 // CHECK-NEXT: call void @_ZN13no_eh_cleanup7releaseEPi
|
|
15 __builtin_os_log_format(buf, "%d %{public}s", i, data);
|
|
16 }
|
|
17
|
|
18 // CHECK: define {{.*}} @__os_log_helper_1_2_2_4_0_8_34({{.*}} [[NUW:#[0-9]+]]
|
|
19 }
|
|
20
|
|
21 // CHECK: attributes [[NUW]] = { {{.*}}nounwind
|