Commit Graph

3 Commits

Author SHA1 Message Date
Anastasia Stulova 782d5f43ca [OpenCL] Improve diagnostics of address spaces for variables in function
- Prevent local variables to be declared in global AS
 - Diagnose AS of local variables with an extern storage class
   as if they would be in a program scope

Review: http://reviews.llvm.org/D17345
llvm-svn: 262641
2016-03-03 18:38:40 +00:00
Anastasia Stulova 784fb78274 [OpenCL 2.0] Apply default address space (AS).
If AS of a variable/parameter declaration is not set by the source,
OpenCL v2.0 s6.5 defines explicit rules for default ASes:

- The AS of global and local static variables defaults to global;
- All pointers point to generic AS.

http://reviews.llvm.org/D13168

llvm-svn: 253863
2015-11-23 11:14:44 +00:00
Anastasia Stulova bd3c08e301 [OpenCL] Add test for program scope variable restrictions in OpenCL v2.0
http://reviews.llvm.org/D13105

llvm-svn: 250892
2015-10-21 10:37:57 +00:00