[clang] [CIR][NFC] Fix converting AtomicType after RecordType modification (PR #202036)

via cfe-commits cfe-commits at lists.llvm.org
Sat Jun 6 04:42:43 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Amr Hesham (AmrDeveloper)

<details>
<summary>Changes</summary>

Fix the conversion of the AtomicType after the change in the structure in #<!-- -->199790 and #<!-- -->200668

---
Full diff: https://github.com/llvm/llvm-project/pull/202036.diff


1 Files Affected:

- (modified) clang/lib/CIR/CodeGen/CIRGenTypes.cpp (+2-2) 


``````````diff
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;

``````````

</details>


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


More information about the cfe-commits mailing list