Support unpacked structs (#3802)

This commit is contained in:
Aleksander Kiryk
2022-12-20 19:22:42 -05:00
committed by GitHub
parent c3b4bc85fa
commit c2b09e35f8
43 changed files with 541 additions and 95 deletions
+7
View File
@@ -73,6 +73,13 @@ class CUseVisitor final : public VNVisitor {
if (nodep->user1SetOnce()) return; // Process once
if (nodep->virtRefDTypep()) iterate(nodep->virtRefDTypep());
if (nodep->virtRefDType2p()) iterate(nodep->virtRefDType2p());
// Add a CUse for every struct that requires a declaration
AstStructDType* const stypep = VN_CAST(nodep->skipRefp(), StructDType);
if (stypep && stypep->classOrPackagep()) {
addNewUse(nodep, VUseType::INT_INCLUDE, stypep->classOrPackagep()->name());
iterateChildren(stypep);
}
}
void visit(AstNode* nodep) override {
if (nodep->user1SetOnce()) return; // Process once