diff options
author | Mikael Nilsson <mikael.nilsson@arm.com> | 2018-12-12 14:11:59 +0000 |
---|---|---|
committer | Mikael Nilsson <mikael.nilsson@arm.com> | 2018-12-12 14:11:59 +0000 |
commit | 8e20f7a8e079e9229434a170e7e451eb3c779966 (patch) | |
tree | 41b4fe607bea3167baa47bc7cfb5f4cae141367a /lib/AST/ASTContext.cpp | |
parent | df55f5633e966afc4b3d5fc76e76f89ba4140b3c (diff) | |
download | clang-8e20f7a8e079e9229434a170e7e451eb3c779966.tar.gz |
[OpenCL] Add generic AS to 'this' pointer
Address spaces are cast into generic before invoking the constructor.
Added support for a trailing Qualifiers object in FunctionProtoType.
Differential Revision: https://reviews.llvm.org/D54862
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@348927 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/ASTContext.cpp')
-rw-r--r-- | lib/AST/ASTContext.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index 39ae9cea87..fae1cf863c 100644 --- a/lib/AST/ASTContext.cpp +++ b/lib/AST/ASTContext.cpp @@ -3768,10 +3768,11 @@ QualType ASTContext::getFunctionTypeInternal( size_t Size = FunctionProtoType::totalSizeToAlloc< QualType, FunctionType::FunctionTypeExtraBitfields, FunctionType::ExceptionType, Expr *, FunctionDecl *, - FunctionProtoType::ExtParameterInfo>( + FunctionProtoType::ExtParameterInfo, Qualifiers>( NumArgs, FunctionProtoType::hasExtraBitfields(EPI.ExceptionSpec.Type), ESH.NumExceptionType, ESH.NumExprPtr, ESH.NumFunctionDeclPtr, - EPI.ExtParameterInfos ? NumArgs : 0); + EPI.ExtParameterInfos ? NumArgs : 0, + EPI.TypeQuals.hasNonFastQualifiers() ? 1 : 0); auto *FTP = (FunctionProtoType *)Allocate(Size, TypeAlignment); FunctionProtoType::ExtProtoInfo newEPI = EPI; |