[clang] [CIR] Unblock simple C++ structure support (PR #138368)
Morris Hafner via cfe-commits
cfe-commits at lists.llvm.org
Sat May 3 08:52:34 PDT 2025
================
@@ -177,18 +177,26 @@ void CIRRecordLowering::lower() {
return;
}
- if (isa<CXXRecordDecl>(recordDecl)) {
- cirGenTypes.getCGModule().errorNYI(recordDecl->getSourceRange(),
- "lower: class");
- return;
- }
-
assert(!cir::MissingFeatures::cxxSupport());
CharUnits size = astRecordLayout.getSize();
accumulateFields();
+ if (auto const *cxxRecordDecl = dyn_cast<CXXRecordDecl>(recordDecl)) {
----------------
mmha wrote:
```suggestion
if (const auto *cxxRecordDecl = dyn_cast<CXXRecordDecl>(recordDecl)) {
```
I am team east const personally, but we use const west throughout the CIR codebase already (unfortunately) :)
https://github.com/llvm/llvm-project/pull/138368
More information about the cfe-commits
mailing list