Merge pull request #83814 from xymus/cdecl-enum-layout

IRGen: Use C compatible representation for `@cdecl` enums
This commit is contained in:
Alexis Laferrière
2025-08-20 10:39:09 -07:00
committed by GitHub
7 changed files with 73 additions and 10 deletions

View File

@@ -539,8 +539,7 @@ public:
}
void forwardDeclare(const EnumDecl *ED) {
assert(ED->isObjC() || ED->getAttrs().getAttribute<CDeclAttr>() ||
ED->hasClangNode());
assert(ED->isCCompatibleEnum() || ED->hasClangNode());
forwardDeclare(ED, [&]{
if (ED->getASTContext().LangOpts.hasFeature(Feature::CDecl)) {