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

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


================
@@ -3088,9 +3088,6 @@ void ItaniumCXXABI::EmitThreadLocalInitFuncs(
       CharUnits Align = CGM.getContext().getDeclAlign(VD);
       Val = Builder.CreateAlignedLoad(Var->getValueType(), Val, Align);
     }
-    if (Val->getType() != Wrapper->getReturnType())
-      Val = Builder.CreatePointerBitCastOrAddrSpaceCast(
----------------
s-barannikov wrote:

I'm in favor of stripping it. In the end, codebase simplification is the whole point of opaque pointers.
This check was added in https://reviews.llvm.org/D5353, which has nothing to do with address spaces.
If it ever breaks, it should be easy to fix.


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


More information about the cfe-commits mailing list