[clang] [clang] Replace uses of CreatePointerBitCastOrAddrSpaceCast (NFC) (PR #68277)

Sergei Barannikov via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 5 16:54:53 PDT 2023


================
@@ -2138,6 +2138,8 @@ class IRBuilderBase {
     return Insert(CastInst::CreatePointerCast(V, DestTy), Name);
   }
 
+  // With opaque pointers enabled, this is same as CreateAddressSpaceCast.
----------------
s-barannikov wrote:

I'll try to rephrase @arsenm comment.
If the types (= address spaces) are the same, CreatePointerBitCastOrAddrSpaceCast does nothing, while CreateAddressSpaceCast aborts. That is, they are equivalent iff the types are different.


https://github.com/llvm/llvm-project/pull/68277


More information about the cfe-commits mailing list