blob: 5187257b06ed7189fce49463b07e203dd80ea628 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
// no PCH
// RUN: %clang_cc1 -fopenmp=libiomp5 -emit-llvm -include %s -include %s %s -o - | FileCheck %s
// with PCH
// RUN: %clang_cc1 -fopenmp=libiomp5 -emit-llvm -chain-include %s -chain-include %s %s -o - | FileCheck %s
#if !defined(PASS1)
#define PASS1
extern "C" int* malloc (int size);
int *a = malloc(20);
#elif !defined(PASS2)
#define PASS2
#pragma omp threadprivate(a)
#else
// CHECK: call {{.*}} @__kmpc_threadprivate_register(
// CHECK-LABEL: foo
int foo() {
return *a;
// CHECK: call {{.*}} @__kmpc_global_thread_num(
// CHECK: call {{.*}} @__kmpc_threadprivate_cached(
}
#endif
|