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

Nikita Popov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 7 06:13:18 PDT 2023


nikic 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());
----------------
In these cases, what we want to do is remove the `BitCast`, which is no longer necessary.


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