================ @@ -95,6 +95,7 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &mlirContext, // TODO(CIR): Should be updated once TypeSizeInfoAttr is upstreamed const unsigned sizeTypeSize = astContext.getTypeSize(astContext.getSignedSizeType()); + SizeSizeInBytes = astContext.toCharUnitsFromBits(sizeTypeSize).getQuantity(); ---------------- bcardosolopes wrote:
In general this happens for the other unions as well. We could get rid of the unions by forcing usage to go through helpers (like getSizeSize(), etc) and the helper itself can use the whatever type it's supposed to match, but this requires cleaning up usages beforehand. Perhaps this cleanup can be done when `TypeSizeInfoAttr` is introduced (at which point we perhaps can kill the `CIRGenTypeCache` altogether, given it should be cheap to grab these types because MLIR value semantics (which is different from the LLVM type representation)). https://github.com/llvm/llvm-project/pull/145802 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits