mirror of https://github.com/YosysHQ/yosys.git
verific: Fix error compiling without VERIFIC_LINEFILE_INCLUDES_COLUMNS
This commit is contained in:
parent
9570b39519
commit
dc959cdf4a
|
|
@ -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…
Reference in New Issue