[cfe-commits] [cfe-dev] Clang and OpenCL address spaces
Peter Collingbourne
peter at pcc.me.uk
Mon Oct 18 13:38:19 PDT 2010
On Mon, Oct 18, 2010 at 10:43:24AM -0700, John McCall wrote:
> On Oct 18, 2010, at 10:33 AM, Peter Collingbourne wrote:
> >> From my understanding of the OpenCL specification, setting the address
> > space on an automatic variable is supposed to not only change the
> > address space but also make the variable static (as the term is defined
> > in standard C). Adding 'static' to the qualifier macro definitions
> > won't work too well because the qualifiers can also appear in other
> > places.
>
> If that's how OpenCL is specified to work, then changing the front-end to
> automatically add 'static' to local variables of address-space-qualified type
> is a very reasonable solution. We would accept a patch for this.
Patch attached. OK to commit?
Thanks,
--
Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-OpenCL-assign-static-storage-class-to-local-variable.patch
Type: text/x-diff
Size: 1870 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20101018/690f406d/attachment.patch>
More information about the cfe-commits
mailing list