mirror of
https://github.com/YosysHQ/yosys
synced 2025-10-21 14:50:33 +00:00
verific: Fix error compiling without VERIFIC_LINEFILE_INCLUDES_COLUMNS
This commit is contained in:
parent
9570b39519
commit
dc959cdf4a
1 changed files with 3 additions and 3 deletions
|
@ -168,12 +168,12 @@ string get_full_netlist_name(Netlist *nl)
|
|||
|
||||
std::string format_src_location(DesignObj *obj)
|
||||
{
|
||||
if (obj == nullptr || obj->Linefile() == nullptr)
|
||||
if (obj == nullptr || !obj->Linefile())
|
||||
return std::string();
|
||||
#ifdef VERIFIC_LINEFILE_INCLUDES_COLUMNS
|
||||
return stringf("%s:%d.%d-%d.%d", LineFile::GetFileName(obj->Linefile()), obj->Linefile()->GetLeftLine(), obj->Linefile()->GetLeftCol(), obj->Linefile()->GetRightLine(), obj->Linefile()->GetRightCol());
|
||||
return stringf("%s:%d.%d-%d.%d", LineFile::GetFileName(obj->Linefile()), obj->Linefile()->GetLeftLine(), obj->Linefile()->GetLeftCol(), obj->Linefile()->GetRightLine(), obj->Linefile()->GetRightCol());
|
||||
#else
|
||||
return stringf("%s:%d", LineFile::GetFileName(obj->Linefile()), LineFile::GetLineNo(obj->Linefile()));
|
||||
return stringf("%s:%d", LineFile::GetFileName(obj->Linefile()), LineFile::GetLineNo(obj->Linefile()));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue