3
0
Fork 0
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:
Miodrag Milanovic 2025-10-13 09:11:46 +02:00
parent 9570b39519
commit dc959cdf4a

View file

@ -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
}