1 // RUN: %clang_cc1 -fopenmp -x c++ -triple x86_64-apple-darwin10 -stack-protector 2 -emit-llvm -o - %s | FileCheck %s
3 // RUN: %clang_cc1 -fopenmp-simd -x c++ -triple x86_64-apple-darwin10 -stack-protector 2 -emit-llvm -o - %s | FileCheck --check-prefix SIMD-ONLY0 %s
4 // SIMD-ONLY0-NOT: {{__kmpc|__tgt}}
6 // Check that function attributes are added to the OpenMP runtime functions.
13 operator T() { return T(); }
17 // CHECK: define internal void @.omp.copyprivate.copy_func(ptr noundef %0, ptr noundef %1) [[ATTR0:#[0-9]+]] {
26 #pragma omp single copyprivate(a)
32 // CHECK: define internal void @.omp_task_privates_map.({{.*}}) [[ATTR3:#[0-9]+]] {
33 // CHECK: define internal noundef i32 @.omp_task_entry.({{.*}}) [[ATTR0]] {
34 // CHECK: define internal noundef i32 @.omp_task_destructor.({{.*}}) [[ATTR0]] {
37 S
<double> s_arr
[] = {1, 2};
39 #pragma omp task private(s_arr, var)
44 // CHECK: define internal void @_Z4foo3iPfS_.omp_outlined.omp.reduction.reduction_func(ptr noundef %0, ptr noundef %1) [[ATTR0]] {
46 float foo3(int n
, float *a
, float *b
) {
50 #pragma omp parallel for private(i) reduction(+:result)
52 result
= result
+ (a
[i
] * b
[i
]);
56 // CHECK: attributes [[ATTR0]] = {{{.*}} sspstrong {{.*}}}
57 // CHECK: attributes [[ATTR3]] = {{{.*}} sspstrong {{.*}}}