mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 01:54:01 +02:00
Make reference to increment temporary an rvalue (#3659)
Signed-off-by: Krzysztof Bieganski <[email protected]>
This commit is contained in:
+2
-1
@@ -189,6 +189,7 @@ private:
|
||||
void visit(AstLogEq* nodep) override { unsupported_visit(nodep); }
|
||||
void visit(AstLogIf* nodep) override { unsupported_visit(nodep); }
|
||||
void visit(AstNodeCond* nodep) override { unsupported_visit(nodep); }
|
||||
void visit(AstPropClocked* nodep) override { unsupported_visit(nodep); }
|
||||
void prepost_visit(AstNodeTriop* nodep) {
|
||||
// Check if we are underneath a statement
|
||||
if (!m_insStmtp) {
|
||||
@@ -273,7 +274,7 @@ private:
|
||||
}
|
||||
|
||||
// Replace the node with the temporary
|
||||
nodep->replaceWith(new AstVarRef(varrefp->fileline(), varp, VAccess::WRITE));
|
||||
nodep->replaceWith(new AstVarRef{varrefp->fileline(), varp, VAccess::READ});
|
||||
VL_DO_DANGLING(nodep->deleteTree(), nodep);
|
||||
}
|
||||
void visit(AstPreAdd* nodep) override { prepost_visit(nodep); }
|
||||
|
||||
Reference in New Issue
Block a user