[PATCH] D153196: [clang] Replace uses of CGBuilderTy::CreateElementBitCast (NFC)

Sergei Barannikov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Jun 17 14:10:53 PDT 2023


barannikov88 added inline comments.


================
Comment at: clang/lib/CodeGen/CGBlocks.cpp:1262-1263
     auto &byrefInfo = getBlockByrefInfo(variable);
     addr = Address(Builder.CreateLoad(addr), Int8Ty, byrefInfo.ByrefAlignment);
-
-    addr = Builder.CreateElementBitCast(addr, byrefInfo.Type, "byref.addr");
+    addr = addr.withElementType(byrefInfo.Type);
 
----------------
I meant something like this :)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D153196



More information about the cfe-commits mailing list