From fcdd8e5da6f91ee794b1a270e688deaa1921d8ac Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Thu, 11 Jan 2024 20:19:48 -0500 Subject: [PATCH] Fix missing includes with multiple inheritance (#3819 partial) --- src/V3EmitCHeaders.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/V3EmitCHeaders.cpp b/src/V3EmitCHeaders.cpp index 4a9bfdb06..795193e5a 100644 --- a/src/V3EmitCHeaders.cpp +++ b/src/V3EmitCHeaders.cpp @@ -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"); } }