diff options
author | Andy Kaylor <akaylor@nvidia.com> | 2025-06-27 09:43:26 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-06-27 09:43:26 -0700 |
commit | 74cabdb806aea341f6bdcc57e2377882f08a4684 (patch) | |
tree | ca9d284148a32a7aa31448c7b8bcd037a6b70d04 /clang/lib/CIR/CodeGen/CIRGenModule.cpp | |
parent | 3e9fd4966d7333a0bd7fcf3b4a7828d0545af90b (diff) | |
download | llvm-74cabdb806aea341f6bdcc57e2377882f08a4684.zip llvm-74cabdb806aea341f6bdcc57e2377882f08a4684.tar.gz llvm-74cabdb806aea341f6bdcc57e2377882f08a4684.tar.bz2 |
[CIR] Add basic support for operator new (#145802)
This adds the code to handle operator new expressions in ClangIR.
Diffstat (limited to 'clang/lib/CIR/CodeGen/CIRGenModule.cpp')
-rw-r--r-- | clang/lib/CIR/CodeGen/CIRGenModule.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/CIR/CodeGen/CIRGenModule.cpp b/clang/lib/CIR/CodeGen/CIRGenModule.cpp index 63cd55a..0f38d9a 100644 --- a/clang/lib/CIR/CodeGen/CIRGenModule.cpp +++ b/clang/lib/CIR/CodeGen/CIRGenModule.cpp @@ -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()); + SizeAlignInBytes = astContext.toCharUnitsFromBits(sizeTypeSize).getQuantity(); // In CIRGenTypeCache, UIntPtrTy and SizeType are fields of the same union UIntPtrTy = cir::IntType::get(&getMLIRContext(), sizeTypeSize, /*isSigned=*/false); |