[PATCH] D69938: [OpenCL] Use __generic addr space when generating internal representation of lambda

Anastasia Stulova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 21 04:32:18 PST 2019


Anastasia added a comment.

In D69938#1752024 <https://reviews.llvm.org/D69938#1752024>, @rjmccall wrote:

> Yes, in that case copy-elision into the global variable is guaranteed.  You can write arbitrary expressions in global initializers, however, and those can use temporary lambdas.


I guess you mean something like this?

  auto glambda = []() { return 1; }();

I don't see a way to change the address space of a lambda object however. It would only be possible to specify addr space qualifiers for a call operator of such lambdas.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69938/new/

https://reviews.llvm.org/D69938





More information about the cfe-commits mailing list