summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ASTContext.cpp
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
commit1b4fb3e08b28f12d508aec0bbdcb6f41cfb0ee38 (patch)
tree5cf8e9985a92136f34520167b6a007eb00fe1468 /clang/lib/AST/ASTContext.cpp
parent359e09d4f50f381dc85d64bc7ea4e06013d09779 (diff)
downloadbcm5719-llvm-1b4fb3e08b28f12d508aec0bbdcb6f41cfb0ee38.tar.gz
bcm5719-llvm-1b4fb3e08b28f12d508aec0bbdcb6f41cfb0ee38.zip
Implement OpenCL event_t as Clang builtin type, including event_t related OpenCL restrictions (OpenCL 1.2 spec 6.9)
llvm-svn: 172973
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
-rw-r--r--clang/lib/AST/ASTContext.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index ace9dc0146a..b18fa679caa 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -893,6 +893,8 @@ void ASTContext::InitBuiltinTypes(const TargetInfo &Target) {
InitBuiltinType(OCLImage2dTy, BuiltinType::OCLImage2d);
InitBuiltinType(OCLImage2dArrayTy, BuiltinType::OCLImage2dArray);
InitBuiltinType(OCLImage3dTy, BuiltinType::OCLImage3d);
+
+ InitBuiltinType(OCLEventTy, BuiltinType::OCLEvent);
}
// Builtin type for __objc_yes and __objc_no
@@ -1434,6 +1436,7 @@ ASTContext::getTypeInfoImpl(const Type *T) const {
Width = Target->getPointerWidth(0);
Align = Target->getPointerAlign(0);
break;
+ case BuiltinType::OCLEvent:
case BuiltinType::OCLImage1d:
case BuiltinType::OCLImage1dArray:
case BuiltinType::OCLImage1dBuffer:
@@ -4895,6 +4898,7 @@ static char getObjCEncodingForPrimitiveKind(const ASTContext *C,
case BuiltinType::OCLImage2d:
case BuiltinType::OCLImage2dArray:
case BuiltinType::OCLImage3d:
+ case BuiltinType::OCLEvent:
case BuiltinType::Dependent:
#define BUILTIN_TYPE(KIND, ID)
#define PLACEHOLDER_TYPE(KIND, ID) \
OpenPOWER on IntegriCloud