[clang] [CIR] Add basic support for operator new (PR #145802)

Bruno Cardoso Lopes via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 26 11:33:30 PDT 2025


================
@@ -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:

Perhaps we could also use type aliases for these: https://github.com/llvm/clangir/issues/360

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


More information about the cfe-commits mailing list