annotate clang/test/PCH/chain-openmp-allocate.cpp @ 150:1d019706d866

LLVM10
author anatofuz
date Thu, 13 Feb 2020 15:10:13 +0900
parents
children 0572611fdcc8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // no PCH
anatofuz
parents:
diff changeset
2 // RUN: %clang_cc1 -fopenmp -fnoopenmp-use-tls -ast-print -include %s -include %s %s -o - | FileCheck %s
anatofuz
parents:
diff changeset
3 // with PCH
anatofuz
parents:
diff changeset
4 // RUN: %clang_cc1 -fopenmp -fnoopenmp-use-tls -ast-print -chain-include %s -chain-include %s %s -o - | FileCheck %s
anatofuz
parents:
diff changeset
5 // no PCH
anatofuz
parents:
diff changeset
6 // RUN: %clang_cc1 -fopenmp -ast-print -include %s -include %s %s -o - | FileCheck %s -check-prefix=CHECK-ALLOC-1
anatofuz
parents:
diff changeset
7 // RUN: %clang_cc1 -fopenmp -ast-print -include %s -include %s %s -o - | FileCheck %s -check-prefix=CHECK-ALLOC-2
anatofuz
parents:
diff changeset
8 // with PCH
anatofuz
parents:
diff changeset
9 // RUN: %clang_cc1 -fopenmp -ast-print -chain-include %s -chain-include %s %s -o - | FileCheck %s -check-prefix=CHECK-ALLOC-1
anatofuz
parents:
diff changeset
10 // RUN: %clang_cc1 -fopenmp -ast-print -chain-include %s -chain-include %s %s -o - | FileCheck %s -check-prefix=CHECK-ALLOC-2
anatofuz
parents:
diff changeset
11
anatofuz
parents:
diff changeset
12 #if !defined(PASS1)
anatofuz
parents:
diff changeset
13 #define PASS1
anatofuz
parents:
diff changeset
14
anatofuz
parents:
diff changeset
15 typedef void **omp_allocator_handle_t;
anatofuz
parents:
diff changeset
16 extern const omp_allocator_handle_t omp_default_mem_alloc;
anatofuz
parents:
diff changeset
17 extern const omp_allocator_handle_t omp_large_cap_mem_alloc;
anatofuz
parents:
diff changeset
18 extern const omp_allocator_handle_t omp_const_mem_alloc;
anatofuz
parents:
diff changeset
19 extern const omp_allocator_handle_t omp_high_bw_mem_alloc;
anatofuz
parents:
diff changeset
20 extern const omp_allocator_handle_t omp_low_lat_mem_alloc;
anatofuz
parents:
diff changeset
21 extern const omp_allocator_handle_t omp_cgroup_mem_alloc;
anatofuz
parents:
diff changeset
22 extern const omp_allocator_handle_t omp_pteam_mem_alloc;
anatofuz
parents:
diff changeset
23 extern const omp_allocator_handle_t omp_thread_mem_alloc;
anatofuz
parents:
diff changeset
24
anatofuz
parents:
diff changeset
25 int a;
anatofuz
parents:
diff changeset
26 // CHECK: int a;
anatofuz
parents:
diff changeset
27
anatofuz
parents:
diff changeset
28 #elif !defined(PASS2)
anatofuz
parents:
diff changeset
29 #define PASS2
anatofuz
parents:
diff changeset
30
anatofuz
parents:
diff changeset
31 #pragma omp allocate(a) allocator(omp_default_mem_alloc)
anatofuz
parents:
diff changeset
32 // CHECK: #pragma omp allocate(a) allocator(omp_default_mem_alloc)
anatofuz
parents:
diff changeset
33
anatofuz
parents:
diff changeset
34 #else
anatofuz
parents:
diff changeset
35
anatofuz
parents:
diff changeset
36 // CHECK-LABEL: foo
anatofuz
parents:
diff changeset
37 // CHECK-ALLOC-LABEL: foo
anatofuz
parents:
diff changeset
38 int foo() {
anatofuz
parents:
diff changeset
39 return a;
anatofuz
parents:
diff changeset
40 // CHECK: return a;
anatofuz
parents:
diff changeset
41 // CHECK-ALLOC-1: return a;
anatofuz
parents:
diff changeset
42 }
anatofuz
parents:
diff changeset
43
anatofuz
parents:
diff changeset
44 // CHECK-ALLOC-2: return a;
anatofuz
parents:
diff changeset
45
anatofuz
parents:
diff changeset
46 #endif