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

> If the types (= address spaces) are the same, 
> CreatePointerBitCastOrAddrSpaceCast does nothing, while 
> CreateAddressSpaceCast aborts. That is, they are equivalent iff the types are 
> different.

Thank you for the clarification!

So `CreateAddrSpaceCast` and `CreatePointerBitCastOrAddrSpaceCast` aren't 
strict equivalents,
but it still seems that uses of `CreatePointerBitCastOrAddrSpaceCast` can be 
substituted with `CreateAddrSpaceCast`.

https://github.com/llvm/llvm-project/pull/68277
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to