[llvm-branch-commits] [clang] clang: Read the address space from the ABIArgInfo (PR #138865)
Artem Belevich via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed May 7 15:16:47 PDT 2025
================
@@ -5384,16 +5384,16 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo,
if (!NeedCopy) {
// Skip the extra memcpy call.
llvm::Value *V = getAsNaturalPointerTo(Addr, I->Ty);
- auto *T = llvm::PointerType::get(
- CGM.getLLVMContext(), CGM.getDataLayout().getAllocaAddrSpace());
+ auto *T = llvm::PointerType::get(CGM.getLLVMContext(),
+ ArgInfo.getIndirectAddrSpace());
// FIXME: This should not depend on the language address spaces, and
// only the contextual values. If the address space mismatches, see if
// we can look through a cast to a compatible address space value,
// otherwise emit a copy.
----------------
Artem-B wrote:
Thank you for the details. It makes sense now.
https://github.com/llvm/llvm-project/pull/138865
More information about the llvm-branch-commits
mailing list