mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 10:03:44 +02:00
When showing an error, show the instance location
This commit is contained in:
+6
-1
@@ -49,7 +49,11 @@
|
||||
void V3Number::v3errorEnd(std::ostringstream& str) const {
|
||||
std::ostringstream nsstr;
|
||||
nsstr<<str.str();
|
||||
m_fileline->v3errorEnd(nsstr);
|
||||
if (m_nodep) {
|
||||
m_nodep->v3errorEnd(nsstr);
|
||||
} else {
|
||||
m_fileline->v3errorEnd(nsstr);
|
||||
}
|
||||
}
|
||||
|
||||
//======================================================================
|
||||
@@ -289,6 +293,7 @@ void V3Number::V3NumberCreate(AstNode* nodep, const char* sourcep, FileLine* fl)
|
||||
}
|
||||
|
||||
void V3Number::setNames(AstNode* nodep) {
|
||||
m_nodep = nodep;
|
||||
if (!nodep) return;
|
||||
m_fileline = nodep->fileline();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user