Commit Graph

2 Commits

Author SHA1 Message Date
Alexey Bader abdcfc1809 [OpenCL] Setting constant address space for array initializers
Summary: Setting constant address space for global constants used for memcpy-initialization of arrays.

Patch by Alexey Sotkin.

Reviewers: bader, yaxunl, Anastasia

Subscribers: cfe-commits, AlexeySotkin

Differential Revision: https://reviews.llvm.org/D25305

llvm-svn: 285557
2016-10-31 10:26:31 +00:00
Yaxun Liu a91da4ba47 [OpenCL] Allow partial initializer for array and struct
Currently Clang allows partial initializer for C99 but not for OpenCL, e.g.

float a[16][16] = {1.0f, 2.0f};

is allowed in C99 but not allowed in OpenCL.

This patch fixes that.

Differential Revision: https://reviews.llvm.org/D25335

llvm-svn: 283891
2016-10-11 15:53:28 +00:00