[PATCH] D152321: [clang] Replace use of Type::getPointerTo() (NFC)
Sergei Barannikov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 15 20:56:08 PDT 2023
barannikov88 added inline comments.
================
Comment at: clang/lib/CodeGen/ItaniumCXXABI.cpp:2552-2554
auto AddrAS = addr ? addr->getType()->getPointerAddressSpace() : 0;
- auto AddrInt8PtrTy =
- AddrAS ? CGF.Int8Ty->getPointerTo(AddrAS) : CGF.Int8PtrTy;
+ auto AddrPtrTy =
+ AddrAS ? llvm::PointerType::get(CGF.getLLVMContext(), AddrAS) : CGF.Int8PtrTy;
----------------
barannikov88 wrote:
> I think this can be simplified further to just:
> `llvm::Type *AddrPtrTy = addr->getType();`
>
I was wrong, `addr` can be null here. Sorry.
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