================
@@ -1191,7 +1193,16 @@ LValue CIRGenFunction::emitCastLValue(const CastExpr *e)
{
case CK_Dynamic:
case CK_ToUnion:
case CK_BaseToDerived:
- case CK_AddressSpaceConversion:
+ case CK_AddressSpaceConversion: {
+ LValue lv = emitLValue(e->getSubExpr());
+ QualType destTy = getContext().getPointerType(e->getType());
+ mlir::Value v = getTargetHooks().performAddrSpaceCast(
----------------
andykaylor wrote:
The change in function signature for `perfromAddrSpaceCast` relative to the
incubator and classic codegen makes me nervous.
Both the incubator and classic codegen get the source address space here from
`E->getSubExpr()->getType().getAddressSpace()`. I would expect you'll get the
same address space, though much less directly, with the way you've implemented
this. However, there are other places where `performAddrSpaceCast` is called
with an address space that didn't come directly from a value, which could be a
problem.
https://github.com/llvm/llvm-project/pull/161212
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits