[clang] [clang] Recover necessary AddrSpaceCast (PR #119246)

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 13 11:39:48 PST 2024


efriedma-quic wrote:

The function in question is part of the Itanium C++ ABI; the ABI itself doesn't say anything about address-spaces, so by default we assume everything related to the C++ ABI is in the flat address-space.  If we start messing with that, we'll need to write a specification somewhere to document exactly which functions use which address-spaces.

So I think casting here is appropriate; we can revisit if someone ever wants to define a "GPU Itanium ABI" with different address-spaces.

The change to ItaniumCXXABI.cpp looks fine (please address the review comments on the regression test).

https://github.com/llvm/llvm-project/pull/119246


More information about the cfe-commits mailing list