[clang] [CIR] Unblock simple C++ structure support (PR #138368)

Andy Kaylor via cfe-commits cfe-commits at lists.llvm.org
Mon May 5 11:04:20 PDT 2025


================
@@ -237,8 +237,11 @@ mlir::Type CIRGenTypes::convertRecordDeclType(const clang::RecordDecl *rd) {
   assert(insertResult && "isSafeToCovert() should have caught this.");
 
   // Force conversion of non-virtual base classes recursively.
-  if (isa<CXXRecordDecl>(rd)) {
-    cgm.errorNYI(rd->getSourceRange(), "CXXRecordDecl");
+  if (const auto *cxxRecordDecl = dyn_cast<CXXRecordDecl>(rd)) {
+    if (cxxRecordDecl->getNumBases() > 0) {
+      cgm.errorNYI(rd->getSourceRange(),
----------------
andykaylor wrote:

Yes, I left it out because we haven't done anything for derived classes in general.

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


More information about the cfe-commits mailing list