[clang] [Clang] Add `-fdefault-generic-addrspace` flag for targeting GPUs (PR #115777)
Matt Arsenault via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 11 14:31:31 PST 2024
================
@@ -1579,7 +1579,7 @@ NamedDecl *Sema::getCurFunctionOrMethodDecl() const {
}
LangAS Sema::getDefaultCXXMethodAddrSpace() const {
- if (getLangOpts().OpenCL)
+ if (getLangOpts().OpenCL || getLangOpts().OpenCLGenericAddressSpace)
----------------
arsenm wrote:
I think this whole thing is just working around a defect in how OpenCL was implemented. There should be no difference between generic and default address space
https://github.com/llvm/llvm-project/pull/115777
More information about the cfe-commits
mailing list