summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ASTContext.cpp
diff options
context:
space:
mode:
authorAnastasia Stulova <anastasia.stulova@arm.com>2017-06-05 11:27:03 +0000
committerAnastasia Stulova <anastasia.stulova@arm.com>2017-06-05 11:27:03 +0000
commitb3398936ab26d7426bd5419da6c57334c3cfc043 (patch)
treeb4a211a471935105229b9637ba91e3846e372036 /clang/lib/AST/ASTContext.cpp
parentf5d486f43d861f938f381d440a9a21383b3bb36f (diff)
downloadbcm5719-llvm-b3398936ab26d7426bd5419da6c57334c3cfc043.tar.gz
bcm5719-llvm-b3398936ab26d7426bd5419da6c57334c3cfc043.zip
[OpenCL] Fix pipe size in TypeInfo.
Pipes are now the size of pointers rather than the size of the type that they contain. Patch by Simon Perretta! Differential Revision: https://reviews.llvm.org/D33597 llvm-svn: 304708
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
-rw-r--r--clang/lib/AST/ASTContext.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index 34c4d2617ec..62b19685c67 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -1939,9 +1939,8 @@ TypeInfo ASTContext::getTypeInfoImpl(const Type *T) const {
break;
case Type::Pipe: {
- TypeInfo Info = getTypeInfo(cast<PipeType>(T)->getElementType());
- Width = Info.Width;
- Align = Info.Align;
+ Width = Target->getPointerWidth(getTargetAddressSpace(LangAS::opencl_global));
+ Align = Target->getPointerAlign(getTargetAddressSpace(LangAS::opencl_global));
}
}
OpenPOWER on IntegriCloud