[PATCH] D22927: [OpenCL] Fix size of image type

Yaxun Liu via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 28 11:58:03 PDT 2016


yaxunl created this revision.
yaxunl added a reviewer: Anastasia.
yaxunl added subscribers: cfe-commits, tstellarAMD.

The size of image type is reported incorrectly as size of a pointer to address space 0, which causes error when casting image type to pointers by __builtin_astype.

The fix is to get image address space from TargetInfo then report the size accordingly.

https://reviews.llvm.org/D22927

Files:
  include/clang/Basic/TargetInfo.h
  lib/AST/ASTContext.cpp
  lib/Basic/Targets.cpp
  lib/CodeGen/CGOpenCLRuntime.cpp
  lib/CodeGen/TargetInfo.cpp
  lib/CodeGen/TargetInfo.h
  test/CodeGenOpenCL/cast_image.cl

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22927.65964.patch
Type: text/x-patch
Size: 5029 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160728/f493830b/attachment.bin>


More information about the cfe-commits mailing list