[PATCH] D36410: [OpenCL] Handle taking address of block captures
Yaxun Liu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 16 07:51:36 PDT 2017
yaxunl added a comment.
Sorry for the delay.
I feel forbidding user taking address of captured variable is too restrictive and make blocks less useful.
A block is quite like a normal function with a generic pointer argument. Users take the responsibility to make sure the cast of a generic pointer to private or global address space is valid at runtime.
I am more inclined to the alternative approach, i.e., assuming captures are located in the generic AS implicitly.
More information about the cfe-commits