diff options
author | Guy Benyei <guy.benyei@intel.com> | 2013-02-07 10:55:47 +0000 |
---|---|---|
committer | Guy Benyei <guy.benyei@intel.com> | 2013-02-07 10:55:47 +0000 |
commit | 21f18c4fda167dc5f72feddbd6a7ac1b63200a0d (patch) | |
tree | 80c1b120c64d3066fd4f5799174a16d8ed49eca0 /include/clang/AST/Type.h | |
parent | f5a6aefa37d73fff3c47953e2c447f074e726a0e (diff) |
Add OpenCL samplers as Clang builtin types and check sampler related restrictions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174601 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/AST/Type.h')
-rw-r--r-- | include/clang/AST/Type.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/clang/AST/Type.h b/include/clang/AST/Type.h index 1469746d43..3e6297aeb8 100644 --- a/include/clang/AST/Type.h +++ b/include/clang/AST/Type.h @@ -1584,6 +1584,7 @@ public: bool isImageType() const; // Any OpenCL image type + bool isSamplerT() const; // OpenCL sampler_t bool isEventT() const; // OpenCL event_t bool isOpenCLSpecificType() const; // Any OpenCL specific type @@ -4918,6 +4919,11 @@ inline bool Type::isImage2dArrayT() const { inline bool Type::isImage3dT() const { return isSpecificBuiltinType(BuiltinType::OCLImage3d); } + +inline bool Type::isSamplerT() const { + return isSpecificBuiltinType(BuiltinType::OCLSampler); +} + inline bool Type::isEventT() const { return isSpecificBuiltinType(BuiltinType::OCLEvent); } @@ -4929,7 +4935,7 @@ inline bool Type::isImageType() const { } inline bool Type::isOpenCLSpecificType() const { - return isImageType() || isEventT(); + return isSamplerT() || isEventT() || isImageType(); } inline bool Type::isTemplateTypeParmType() const { |