Fix task inlining under , bug589.

This commit is contained in:
Wilson Snyder
2012-12-15 21:41:37 -05:00
parent e68afa53a8
commit 4c7f051247
3 changed files with 10 additions and 4 deletions
+4
View File
@@ -979,9 +979,13 @@ private:
// Iterate into the FTask we are calling. Note it may be under a different
// scope then the caller, so we need to restore state.
AstScope* oldscopep = m_scopep;
InsertMode prevInsMode = m_insMode;
AstNode* prevInsStmtp = m_insStmtp;
m_scopep = m_statep->getScope(nodep);
nodep->accept(*this);
m_scopep = oldscopep;
m_insMode = prevInsMode;
m_insStmtp = prevInsStmtp;
}
void insertBeforeStmt(AstNode* nodep, AstNode* newp) {
// See also AstNode::addBeforeStmt; this predates that function