diff options
author | Anastasia Stulova <anastasia.stulova@arm.com> | 2019-01-14 11:44:22 +0000 |
---|---|---|
committer | Anastasia Stulova <anastasia.stulova@arm.com> | 2019-01-14 11:44:22 +0000 |
commit | d1986d1b5a671bb73481f595a9d7e130b11f0d55 (patch) | |
tree | ad8a9e7a41d37145b421f5c771f64f1a1ec2c1a0 /clang/lib/CodeGen/CGCall.cpp | |
parent | 560b853ccfa65815c2262d4eaadf54bf96e9ae52 (diff) | |
download | bcm5719-llvm-d1986d1b5a671bb73481f595a9d7e130b11f0d55.tar.gz bcm5719-llvm-d1986d1b5a671bb73481f595a9d7e130b11f0d55.zip |
[OpenCL] Set generic addr space of 'this' in special class members.
Set address spaces of 'this' param correctly for implicit special
class members.
This also changes initialization conversion sequence to separate
address space conversion from other qualifiers in case of binding
reference to a temporary. In this case address space conversion
should happen after the binding (unlike for other quals). This is
needed to materialize it correctly in the alloca address space.
Initial patch by Mikael Nilssoni!
Differential Revision: https://reviews.llvm.org/D56066
llvm-svn: 351053
Diffstat (limited to 'clang/lib/CodeGen/CGCall.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGCall.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp index 09116d465e3..455a25434ff 100644 --- a/clang/lib/CodeGen/CGCall.cpp +++ b/clang/lib/CodeGen/CGCall.cpp @@ -74,7 +74,7 @@ static CanQualType GetThisType(ASTContext &Context, const CXXRecordDecl *RD, const CXXMethodDecl *MD) { QualType RecTy = Context.getTagDeclType(RD)->getCanonicalTypeInternal(); if (MD) - RecTy = Context.getAddrSpaceQualType(RecTy, MD->getType().getAddressSpace()); + RecTy = Context.getAddrSpaceQualType(RecTy, MD->getTypeQualifiers().getAddressSpace()); return Context.getPointerType(CanQualType::CreateUnsafe(RecTy)); } |