aboutsummaryrefslogtreecommitdiff
path: root/include/clang/AST/Type.h
diff options
context:
space:
mode:
authorGuy Benyei <guy.benyei@intel.com>2013-01-20 12:31:11 +0000
committerGuy Benyei <guy.benyei@intel.com>2013-01-20 12:31:11 +0000
commite6b9d802fb7b16d93474c4f1c179ab36202e8a8b (patch)
tree9a396d8d98d2ac759c7050a9838cd3439f6ba02a /include/clang/AST/Type.h
parentb3ce35764adcc5749e8729709b1f3737227d90ec (diff)
downloadclang-e6b9d802fb7b16d93474c4f1c179ab36202e8a8b.tar.gz
Implement OpenCL event_t as Clang builtin type, including event_t related OpenCL restrictions (OpenCL 1.2 spec 6.9)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172973 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/AST/Type.h')
-rw-r--r--include/clang/AST/Type.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/clang/AST/Type.h b/include/clang/AST/Type.h
index f1db761557..cc6c1fd445 100644
--- a/include/clang/AST/Type.h
+++ b/include/clang/AST/Type.h
@@ -1584,6 +1584,8 @@ public:
bool isImageType() const; // Any OpenCL image type
+ bool isEventT() const; // OpenCL event_t
+
bool isOpenCLSpecificType() const; // Any OpenCL specific type
/// Determines if this type, which must satisfy
@@ -4916,6 +4918,10 @@ inline bool Type::isImage2dArrayT() const {
inline bool Type::isImage3dT() const {
return isSpecificBuiltinType(BuiltinType::OCLImage3d);
}
+inline bool Type::isEventT() const {
+ return isSpecificBuiltinType(BuiltinType::OCLEvent);
+}
+
inline bool Type::isImageType() const {
return isImage3dT() ||
isImage2dT() || isImage2dArrayT() ||
@@ -4923,7 +4929,7 @@ inline bool Type::isImageType() const {
}
inline bool Type::isOpenCLSpecificType() const {
- return isImageType();
+ return isImageType() || isEventT();
}
inline bool Type::isTemplateTypeParmType() const {