summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ASTContext.cpp
diff options
context:
space:
mode:
authorMikael Nilsson <mikael.nilsson@arm.com>2018-12-12 14:11:59 +0000
committerMikael Nilsson <mikael.nilsson@arm.com>2018-12-12 14:11:59 +0000
commit78de84719be091be1d6be231a588cda2e21fd74f (patch)
tree5a2365d7eb443c6f7dc893888d9772006ad83a26 /clang/lib/AST/ASTContext.cpp
parentf6c898e12f7f15130a3557c71a43074ee7f1b1b9 (diff)
downloadbcm5719-llvm-78de84719be091be1d6be231a588cda2e21fd74f.tar.gz
bcm5719-llvm-78de84719be091be1d6be231a588cda2e21fd74f.zip
[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 llvm-svn: 348927
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
-rw-r--r--clang/lib/AST/ASTContext.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index 39ae9cea87f..fae1cf863c0 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/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;
OpenPOWER on IntegriCloud