Fix missing includes with multiple inheritance (#3819 partial)

This commit is contained in:
Wilson Snyder 2024-01-11 20:19:48 -05:00
parent ab47fc6656
commit fcdd8e5da6
1 changed files with 3 additions and 3 deletions

View File

@ -296,9 +296,9 @@ class EmitCHeader final : public EmitCConstInit {
void emitAll(const AstNodeModule* modp) {
// Include files required by this AstNodeModule
if (const AstClass* const classp = VN_CAST(modp, Class)) {
if (classp->extendsp()) {
puts("#include \""
+ prefixNameProtect(classp->extendsp()->classp()->classOrPackagep())
for (const AstClassExtends* extp = classp->extendsp(); extp;
extp = VN_AS(extp->nextp(), ClassExtends)) {
puts("#include \"" + prefixNameProtect(extp->classp()->classOrPackagep())
+ ".h\"\n");
}
}