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

2025-06-27 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor closed 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

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

2025-06-27 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. 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

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

2025-06-26 Thread Andy Kaylor via cfe-commits
@@ -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.toCha

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

2025-06-26 Thread Bruno Cardoso Lopes via cfe-commits
@@ -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.toCha

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

2025-06-26 Thread Bruno Cardoso Lopes via cfe-commits
@@ -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.toCha

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

2025-06-26 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM, one minor comment 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

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

2025-06-26 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited 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

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

2025-06-26 Thread Erich Keane via cfe-commits
@@ -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.toCha

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

2025-06-26 Thread Andy Kaylor via cfe-commits
@@ -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.toCha

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

2025-06-26 Thread Andy Kaylor via cfe-commits
@@ -66,6 +66,16 @@ struct CIRGenTypeCache { unsigned char PointerSizeInBytes; }; + /// The size and alignment of size_t. + union { +unsigned char SizeSizeInBytes; // sizeof(size_t) andykaylor wrote: It will eventually be used by the array cookie i

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

2025-06-26 Thread Erich Keane via cfe-commits
@@ -66,6 +66,16 @@ struct CIRGenTypeCache { unsigned char PointerSizeInBytes; }; + /// The size and alignment of size_t. + union { +unsigned char SizeSizeInBytes; // sizeof(size_t) erichkeane wrote: Is this used? Also, fact that this and the one

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

2025-06-26 Thread Sirui Mu via cfe-commits
https://github.com/Lancern approved this pull request. LGTM 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

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

2025-06-26 Thread Erich Keane via cfe-commits
@@ -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.toCha