[PATCH] D152321: [clang] Replace use of Type::getPointerTo() (NFC)

Youngsuk Kim via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 7 08:41:41 PDT 2023


JOE1994 added inline comments.


================
Comment at: clang/lib/CodeGen/Address.h:135
     llvm::Constant *BitCast = llvm::ConstantExpr::getBitCast(
-        getPointer(), ElemTy->getPointerTo(getAddressSpace()));
+        getPointer(), llvm::PointerType::get(ElemTy, getAddressSpace()));
     return ConstantAddress(BitCast, ElemTy, getAlignment());
----------------
nikic wrote:
> In these cases, what we want to do is remove the `BitCast`, which is no longer necessary.
Thank you for your feedback! I've updated the revision accordingly.


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