[clang] 0373a65 - [CIR][NFC] Fix converting AtomicType after RecordType modification (#202036)
via cfe-commits
cfe-commits at lists.llvm.org
Sat Jun 6 05:55:03 PDT 2026
Author: Amr Hesham
Date: 2026-06-06T14:54:59+02:00
New Revision: 0373a653ecfd55c2ed1c014fb07e3872583af736
URL: https://github.com/llvm/llvm-project/commit/0373a653ecfd55c2ed1c014fb07e3872583af736
DIFF: https://github.com/llvm/llvm-project/commit/0373a653ecfd55c2ed1c014fb07e3872583af736.diff
LOG: [CIR][NFC] Fix converting AtomicType after RecordType modification (#202036)
Fix the conversion of the AtomicType after the change in the structure
in #199790 and #200668
Fix #202031
Added:
Modified:
clang/lib/CIR/CodeGen/CIRGenTypes.cpp
Removed:
################################################################################
diff --git a/clang/lib/CIR/CodeGen/CIRGenTypes.cpp b/clang/lib/CIR/CodeGen/CIRGenTypes.cpp
index e6452f8592d22..ea37d82c82d79 100644
--- a/clang/lib/CIR/CodeGen/CIRGenTypes.cpp
+++ b/clang/lib/CIR/CodeGen/CIRGenTypes.cpp
@@ -643,9 +643,9 @@ mlir::Type CIRGenTypes::convertType(QualType type) {
auto paddingArray =
cir::ArrayType::get(cgm.sInt8Ty, (atomicSize - valueSize) / 8);
mlir::Type elements[] = {resultType, paddingArray};
- resultType = cir::RecordType::get(&getMLIRContext(), /*members=*/elements,
+ resultType = cir::StructType::get(&getMLIRContext(), /*members=*/elements,
/*packed=*/false, /*padded=*/false,
- /*kind=*/cir::RecordType::Struct);
+ /*is_class=*/false);
}
break;
More information about the cfe-commits
mailing list