Support direct programming interface (DPI) "import".

This commit is contained in:
Wilson Snyder
2009-12-03 06:55:29 -05:00
parent f8cb6979d7
commit a40fae04ce
33 changed files with 1639 additions and 124 deletions
+11
View File
@@ -405,10 +405,21 @@ private:
nodep->funcp()->accept(*this);
}
}
virtual void visit(AstCFunc* nodep, AstNUser*) {
//UINFO(4," CCALL "<<nodep<<endl);
if (nodep->dpiImport() && !nodep->pure()) {
m_sideEffect = true; // If appears on assign RHS, don't ever delete the assignment
}
nodep->iterateChildren(*this);
}
virtual void visit(AstUCFunc* nodep, AstNUser*) {
m_sideEffect = true; // If appears on assign RHS, don't ever delete the assignment
nodep->iterateChildren(*this);
}
virtual void visit(AstCMath* nodep, AstNUser*) {
m_sideEffect = true; // If appears on assign RHS, don't ever delete the assignment
nodep->iterateChildren(*this);
}
virtual void visit(AstVar*, AstNUser*) {} // Don't want varrefs under it
virtual void visit(AstNode* nodep, AstNUser*) {