================ @@ -1123,9 +1123,7 @@ void CodeGenFunction::StartFunction(GlobalDecl GD, QualType RetTy, if (!CurFnInfo->getReturnInfo().getIndirectByVal()) { ReturnValuePointer = CreateDefaultAlignTempAlloca(Int8PtrTy, "result.ptr"); - Builder.CreateStore(Builder.CreatePointerBitCastOrAddrSpaceCast( - ReturnValue.getPointer(), Int8PtrTy), - ReturnValuePointer); + Builder.CreateStore(ReturnValue.getPointer(), ReturnValuePointer); ---------------- JOE1994 wrote:
> But even if it would cast away an address space it seems a bit weird. Yes, I agree.. > (And maybe the "result.ptr" should be created with > ReturnValue.getPointer().getType() rather than using Int8PtrTy. Although I > consider that as out of scope for this patch.) I also agree. Since, adding the change to this revision doesn't add new failures with `ninja check-clang`, I think it can be merged to this patch. I'll add the change to this revision. https://github.com/llvm/llvm-project/pull/68277 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits