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

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 26 10:21:49 PST 2019


rjmccall added inline comments.


================
Comment at: clang/lib/Sema/SemaLambda.cpp:891
+    if (getLangOpts().OpenCL)
+      EPI.TypeQuals.addAddressSpace(LangAS::opencl_generic);
+
----------------
Anastasia wrote:
> rjmccall wrote:
> > This should probably check that there isn't already an address space, right?
> EPI has just been constructed newly here or do you mean if addr space has been set in the constructor? That is currently not the case but might happen in the future perhaps.
Oh, sorry, I see now that this is the place where we synthesize a signature.  This is fine, nevermind.

Actually, could you go ahead and extract out some sort of `getDefaultCXXMethodAddrSpace()` function on Sema that you can use consistently here and in the other places?


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

https://reviews.llvm.org/D69938





More information about the cfe-commits mailing list