Mercurial > hg > CbC > CbC_llvm
comparison clang/test/PCH/chain-openmp-allocate.cpp @ 150:1d019706d866
LLVM10
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 15:10:13 +0900 |
parents | |
children | 0572611fdcc8 |
comparison
equal
deleted
inserted
replaced
147:c2174574ed3a | 150:1d019706d866 |
---|---|
1 // no PCH | |
2 // RUN: %clang_cc1 -fopenmp -fnoopenmp-use-tls -ast-print -include %s -include %s %s -o - | FileCheck %s | |
3 // with PCH | |
4 // RUN: %clang_cc1 -fopenmp -fnoopenmp-use-tls -ast-print -chain-include %s -chain-include %s %s -o - | FileCheck %s | |
5 // no PCH | |
6 // RUN: %clang_cc1 -fopenmp -ast-print -include %s -include %s %s -o - | FileCheck %s -check-prefix=CHECK-ALLOC-1 | |
7 // RUN: %clang_cc1 -fopenmp -ast-print -include %s -include %s %s -o - | FileCheck %s -check-prefix=CHECK-ALLOC-2 | |
8 // with PCH | |
9 // RUN: %clang_cc1 -fopenmp -ast-print -chain-include %s -chain-include %s %s -o - | FileCheck %s -check-prefix=CHECK-ALLOC-1 | |
10 // RUN: %clang_cc1 -fopenmp -ast-print -chain-include %s -chain-include %s %s -o - | FileCheck %s -check-prefix=CHECK-ALLOC-2 | |
11 | |
12 #if !defined(PASS1) | |
13 #define PASS1 | |
14 | |
15 typedef void **omp_allocator_handle_t; | |
16 extern const omp_allocator_handle_t omp_default_mem_alloc; | |
17 extern const omp_allocator_handle_t omp_large_cap_mem_alloc; | |
18 extern const omp_allocator_handle_t omp_const_mem_alloc; | |
19 extern const omp_allocator_handle_t omp_high_bw_mem_alloc; | |
20 extern const omp_allocator_handle_t omp_low_lat_mem_alloc; | |
21 extern const omp_allocator_handle_t omp_cgroup_mem_alloc; | |
22 extern const omp_allocator_handle_t omp_pteam_mem_alloc; | |
23 extern const omp_allocator_handle_t omp_thread_mem_alloc; | |
24 | |
25 int a; | |
26 // CHECK: int a; | |
27 | |
28 #elif !defined(PASS2) | |
29 #define PASS2 | |
30 | |
31 #pragma omp allocate(a) allocator(omp_default_mem_alloc) | |
32 // CHECK: #pragma omp allocate(a) allocator(omp_default_mem_alloc) | |
33 | |
34 #else | |
35 | |
36 // CHECK-LABEL: foo | |
37 // CHECK-ALLOC-LABEL: foo | |
38 int foo() { | |
39 return a; | |
40 // CHECK: return a; | |
41 // CHECK-ALLOC-1: return a; | |
42 } | |
43 | |
44 // CHECK-ALLOC-2: return a; | |
45 | |
46 #endif |