[clang] [CIR] Upstream global initialization for ComplexType (PR #141369)

Henrich Lauko via cfe-commits cfe-commits at lists.llvm.org
Sun May 25 11:02:12 PDT 2025


================
@@ -385,6 +385,13 @@ mlir::Type CIRGenTypes::convertType(QualType type) {
     break;
   }
 
+  case Type::Complex: {
+    const ComplexType *ct = cast<ComplexType>(ty);
+    mlir::Type elementTy = convertType(ct->getElementType());
----------------
xlauko wrote:

```suggestion
    const auto *ct = mlir::cast<cir::ComplexType>(ty);
    mlir::Type elementTy = convertType(ct->getElementType());
```

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


More information about the cfe-commits mailing list