https://github.com/AmrDeveloper created 
https://github.com/llvm/llvm-project/pull/202036

Fix the conversion of the AtomicType after the change in the structure in 
#199790 and #200668

>From dc28c38e7e1197b15e6d6c709da56940f8a538b0 Mon Sep 17 00:00:00 2001
From: Amr Hesham <[email protected]>
Date: Sat, 6 Jun 2026 13:34:13 +0200
Subject: [PATCH] [CIR][NFC] Fix converting AtomicType after RecordType
 modification

---
 clang/lib/CIR/CodeGen/CIRGenTypes.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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;

_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to