diff options
author | Egor Churaev <egor.churaev@gmail.com> | 2016-12-20 09:15:21 +0000 |
---|---|---|
committer | Egor Churaev <egor.churaev@gmail.com> | 2016-12-20 09:15:21 +0000 |
commit | b49f706eef3ac5cdadd86aaac5a50335cf8d895e (patch) | |
tree | d778615345c1c6e7d0fd92820a421cc5da145686 /include | |
parent | 4e57f52faea670d545cbe937f52e6e9cf5d19b0b (diff) |
[OpenCL] Enabling the usage of CLK_NULL_QUEUE as compare operand.
Summary: Enabling the compression of CLK_NULL_QUEUE to variable of type queue_t.
Reviewers: Anastasia
Subscribers: cfe-commits, yaxunl, bader
Differential Revision: https://reviews.llvm.org/D27569
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290171 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/clang/AST/OperationKinds.def | 3 | ||||
-rw-r--r-- | include/clang/Sema/Initialization.h | 5 | ||||
-rw-r--r-- | include/clang/Sema/Overload.h | 1 |
3 files changed, 9 insertions, 0 deletions
diff --git a/include/clang/AST/OperationKinds.def b/include/clang/AST/OperationKinds.def index 03a61e94e2..2d48a7df47 100644 --- a/include/clang/AST/OperationKinds.def +++ b/include/clang/AST/OperationKinds.def @@ -321,6 +321,9 @@ CAST_OPERATION(BuiltinFnToFnPtr) // Convert a zero value for OpenCL event_t initialization. CAST_OPERATION(ZeroToOCLEvent) +// Convert a zero value for OpenCL queue_t initialization. +CAST_OPERATION(ZeroToOCLQueue) + // Convert a pointer to a different address space. CAST_OPERATION(AddressSpaceConversion) diff --git a/include/clang/Sema/Initialization.h b/include/clang/Sema/Initialization.h index c2795fcaf3..a7b8cce326 100644 --- a/include/clang/Sema/Initialization.h +++ b/include/clang/Sema/Initialization.h @@ -751,6 +751,8 @@ public: SK_StdInitializerListConstructorCall, /// \brief Initialize an OpenCL sampler from an integer. SK_OCLSamplerInit, + /// \brief Initialize queue_t from 0. + SK_OCLZeroQueue, /// \brief Passing zero to a function where OpenCL event_t is expected. SK_OCLZeroEvent }; @@ -1148,6 +1150,9 @@ public: /// constant. void AddOCLZeroEventStep(QualType T); + /// \brief Add a step to initialize an OpenCL queue_t from 0. + void AddOCLZeroQueueStep(QualType T); + /// \brief Add steps to unwrap a initializer list for a reference around a /// single element and rewrap it at the end. void RewrapReferenceInitList(QualType T, InitListExpr *Syntactic); diff --git a/include/clang/Sema/Overload.h b/include/clang/Sema/Overload.h index 7c6699aca0..9771044a07 100644 --- a/include/clang/Sema/Overload.h +++ b/include/clang/Sema/Overload.h @@ -83,6 +83,7 @@ namespace clang { ICK_TransparentUnionConversion, ///< Transparent Union Conversions ICK_Writeback_Conversion, ///< Objective-C ARC writeback conversion ICK_Zero_Event_Conversion, ///< Zero constant to event (OpenCL1.2 6.12.10) + ICK_Zero_Queue_Conversion, ///< Zero constant to queue ICK_C_Only_Conversion, ///< Conversions allowed in C, but not C++ ICK_Incompatible_Pointer_Conversion, ///< C-only conversion between pointers /// with incompatible types |