brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · cab2653 Raw
48 lines · cpp
1// no PCH2// RUN: %clang_cc1 -fopenmp -fnoopenmp-use-tls -ast-print -include %s -include %s %s -o - | FileCheck %s3// with PCH4// RUN: %clang_cc1 -fopenmp -fnoopenmp-use-tls -ast-print -chain-include %s -chain-include %s %s -o - | FileCheck %s5// no PCH6// RUN: %clang_cc1 -fopenmp -ast-print -include %s -include %s %s -o - | FileCheck %s -check-prefix=CHECK-ALLOC-17// RUN: %clang_cc1 -fopenmp -ast-print -include %s -include %s %s -o - | FileCheck %s -check-prefix=CHECK-ALLOC-28// with PCH9// RUN: %clang_cc1 -fopenmp -ast-print -chain-include %s -chain-include %s %s -o - | FileCheck %s -check-prefix=CHECK-ALLOC-110// RUN: %clang_cc1 -fopenmp -ast-print -chain-include %s -chain-include %s %s -o - | FileCheck %s -check-prefix=CHECK-ALLOC-211 12#if !defined(PASS1)13#define PASS114 15typedef void **omp_allocator_handle_t;16extern const omp_allocator_handle_t omp_null_allocator;17extern const omp_allocator_handle_t omp_default_mem_alloc;18extern const omp_allocator_handle_t omp_large_cap_mem_alloc;19extern const omp_allocator_handle_t omp_const_mem_alloc;20extern const omp_allocator_handle_t omp_high_bw_mem_alloc;21extern const omp_allocator_handle_t omp_low_lat_mem_alloc;22extern const omp_allocator_handle_t omp_cgroup_mem_alloc;23extern const omp_allocator_handle_t omp_pteam_mem_alloc;24extern const omp_allocator_handle_t omp_thread_mem_alloc;25 26int a;27// CHECK: int a;28 29#elif !defined(PASS2)30#define PASS231 32#pragma omp allocate(a) allocator(omp_default_mem_alloc)33// CHECK: #pragma omp allocate(a) allocator(omp_default_mem_alloc)34 35#else36 37// CHECK-LABEL: foo38// CHECK-ALLOC-LABEL: foo39int foo() {40  return a;41  // CHECK: return a;42  // CHECK-ALLOC-1: return a;43}44 45// CHECK-ALLOC-2: return a;46 47#endif48