[PATCH] D152321: [clang] Replace use of Type::getPointerTo() (NFC)
Nikita Popov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 8 11:38:59 PDT 2023
nikic added inline comments.
================
Comment at: clang/lib/CodeGen/CGBuilder.h:172
+ auto *PtrTy = llvm::PointerType::get(Ty, Addr.getAddressSpace());
return Address(CreateBitCast(Addr.getPointer(), PtrTy, Name), Ty,
Addr.getAlignment(), Addr.isKnownNonNull());
----------------
JOE1994 wrote:
> nikic wrote:
> > Can remove this bit cast.
> Wouldn't removing the bitcast cause behavior change for uses of `CreateElementBitCast` that supply a `Name` that is not `""`?
This will never actually create an instruction, so the name is already ignored now. It would make sense to remove the parameter altogether.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152321/new/
https://reviews.llvm.org/D152321
More information about the cfe-commits
mailing list