Emit implementations into separate files based on required headers.

This patch partitions AstCFuncs under an AstNodeModule based on which
header files they require for their implementation, and emits them
into separate files based on the distinct dependency sets. This helps
with incremental recompilation of the output C++.
This commit is contained in:
Geza Lore
2021-07-22 18:01:07 +01:00
parent 8bb77f86ec
commit ab4063f098
18 changed files with 378 additions and 94 deletions
-2
View File
@@ -59,8 +59,6 @@ class CUseVisitor final : public AstNVisitor {
virtual void visit(AstClassRefDType* nodep) override {
if (nodep->user1SetOnce()) return; // Process once
if (!m_impOnly) addNewUse(nodep, VUseType::INT_FWD_CLASS, nodep->classp()->name());
// No class.h, it's inside the class package's h file
addNewUse(nodep, VUseType::IMP_INCLUDE, nodep->classp()->classOrPackagep()->name());
// Need to include extends() when we implement, but no need for pointers to know
VL_RESTORER(m_impOnly);
{