[PATCH] D153694: [clang][CodeGen] Remove no-op EmitCastToVoidPtr (NFC)

Sergei Barannikov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Jun 24 04:11:53 PDT 2023


barannikov88 added inline comments.


================
Comment at: clang/lib/CodeGen/CGAtomic.cpp:90
+        StoragePtr = CGF.Builder.CreateAddrSpaceCast(
+            StoragePtr, llvm::PointerType::getUnqual(CGF.getLLVMContext()),
             "atomic_bitfield_base");
----------------
I suppose address space shouldn't be dropped here, but this is what the original code does.



================
Comment at: clang/lib/CodeGen/ItaniumCXXABI.cpp:1473
                                                   QualType SrcRecordTy,
                                                   QualType DestTy) {
   auto *ClassDecl =
----------------
`DestTy` has become unused in both implementations. I'm not sure if I should remove it. It is always a [cv-qualified] `void *`.



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D153694/new/

https://reviews.llvm.org/D153694



More information about the cfe-commits mailing list