2015-05-27 14:47:56 -04:00
|
|
|
// RUN: %clang_cc1 -verify -fopenmp -x c++ -emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck %s
|
|
|
|
|
// RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s
|
2015-12-30 06:49:41 -05:00
|
|
|
// RUN: %clang_cc1 -fopenmp -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -debug-info-kind=limited -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s
|
2018-07-28 07:06:01 -04:00
|
|
|
|
|
|
|
|
// RUN: %clang_cc1 -verify -fopenmp-simd -x c++ -emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck --check-prefix SIMD-ONLY0 %s
|
|
|
|
|
// RUN: %clang_cc1 -fopenmp-simd -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s
|
|
|
|
|
// RUN: %clang_cc1 -fopenmp-simd -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -debug-info-kind=limited -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s
|
|
|
|
|
// SIMD-ONLY0-NOT: {{__kmpc|__tgt}}
|
2015-01-18 11:23:48 -05:00
|
|
|
// expected-no-diagnostics
|
|
|
|
|
#ifndef HEADER
|
|
|
|
|
#define HEADER
|
|
|
|
|
|
|
|
|
|
template <class T>
|
|
|
|
|
T tmain(T argc) {
|
|
|
|
|
static T a;
|
|
|
|
|
#pragma omp flush
|
|
|
|
|
#pragma omp flush(a)
|
|
|
|
|
return a + argc;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// CHECK-LABEL: @main
|
|
|
|
|
int main() {
|
|
|
|
|
static int a;
|
|
|
|
|
#pragma omp flush
|
|
|
|
|
#pragma omp flush(a)
|
2015-07-05 10:23:59 -04:00
|
|
|
// CHECK: call {{.*}}void @__kmpc_flush(%{{.+}}* {{(@|%).+}})
|
|
|
|
|
// CHECK: call {{.*}}void @__kmpc_flush(%{{.+}}* {{(@|%).+}})
|
2015-01-18 11:23:48 -05:00
|
|
|
return tmain(a);
|
|
|
|
|
// CHECK: call {{.*}} [[TMAIN:@.+]](
|
|
|
|
|
// CHECK: ret
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// CHECK: [[TMAIN]]
|
2015-07-05 10:23:59 -04:00
|
|
|
// CHECK: call {{.*}}void @__kmpc_flush(%{{.+}}* {{(@|%).+}})
|
|
|
|
|
// CHECK: call {{.*}}void @__kmpc_flush(%{{.+}}* {{(@|%).+}})
|
2015-01-18 11:23:48 -05:00
|
|
|
// CHECK: ret
|
|
|
|
|
|
2018-07-28 07:06:01 -04:00
|
|
|
// CHECK-NOT: line: 0,
|
|
|
|
|
|
2015-01-18 11:23:48 -05:00
|
|
|
#endif
|