Author: Sven van Haastregt Date: 2021-05-26T12:32:07+01:00 New Revision: ba0fe85ec0e93db44f9babaace84cb9ab29ff5f4
URL: https://github.com/llvm/llvm-project/commit/ba0fe85ec0e93db44f9babaace84cb9ab29ff5f4 DIFF: https://github.com/llvm/llvm-project/commit/ba0fe85ec0e93db44f9babaace84cb9ab29ff5f4.diff LOG: [OpenCL] Include header for atomic-ops test Avoid duplicating the memory_order and memory_scope enum definitions. Added: Modified: clang/test/SemaOpenCL/atomic-ops.cl Removed: ################################################################################ diff --git a/clang/test/SemaOpenCL/atomic-ops.cl b/clang/test/SemaOpenCL/atomic-ops.cl index 302cd79dd8a86..8d150d0fd9297 100644 --- a/clang/test/SemaOpenCL/atomic-ops.cl +++ b/clang/test/SemaOpenCL/atomic-ops.cl @@ -1,7 +1,7 @@ // RUN: %clang_cc1 %s -cl-std=CL2.0 -verify=expected,spir \ -// RUN: -fsyntax-only -triple=spir64 +// RUN: -fsyntax-only -triple=spir64 -fdeclare-opencl-builtins -finclude-default-header // RUN: %clang_cc1 %s -cl-std=CL2.0 -verify -fsyntax-only \ -// RUN: -triple=amdgcn-amd-amdhsa +// RUN: -triple=amdgcn-amd-amdhsa -fdeclare-opencl-builtins -finclude-default-header // Basic parsing/Sema tests for __opencl_atomic_* @@ -9,27 +9,6 @@ #pragma OPENCL EXTENSION cl_khr_int64_extended_atomics : enable #pragma OPENCL EXTENSION cl_khr_fp16 : enable -typedef __INTPTR_TYPE__ intptr_t; -typedef int int8 __attribute__((ext_vector_type(8))); - -typedef enum memory_order { - memory_order_relaxed = __ATOMIC_RELAXED, - memory_order_acquire = __ATOMIC_ACQUIRE, - memory_order_release = __ATOMIC_RELEASE, - memory_order_acq_rel = __ATOMIC_ACQ_REL, - memory_order_seq_cst = __ATOMIC_SEQ_CST -} memory_order; - -typedef enum memory_scope { - memory_scope_work_item = __OPENCL_MEMORY_SCOPE_WORK_ITEM, - memory_scope_work_group = __OPENCL_MEMORY_SCOPE_WORK_GROUP, - memory_scope_device = __OPENCL_MEMORY_SCOPE_DEVICE, - memory_scope_all_svm_devices = __OPENCL_MEMORY_SCOPE_ALL_SVM_DEVICES, -#if defined(cl_intel_subgroups) || defined(cl_khr_subgroups) - memory_scope_sub_group = __OPENCL_MEMORY_SCOPE_SUB_GROUP -#endif -} memory_scope; - struct S { char c[3]; }; char i8; _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits