mirror of https://github.com/YosysHQ/yosys.git
Handling non-existing location in verific logs
This commit is contained in:
parent
4eb18e1f07
commit
f06d56d224
|
@ -115,7 +115,9 @@ void msg_func(msg_type_t msg_type, const char *message_id, linefile_type linefil
|
||||||
|
|
||||||
if (log_verific_callback) {
|
if (log_verific_callback) {
|
||||||
string full_message = stringf("%s%s\n", message_prefix.c_str(), message.c_str());
|
string full_message = stringf("%s%s\n", message_prefix.c_str(), message.c_str());
|
||||||
log_verific_callback(int(msg_type), message_id, LineFile::GetFileName(linefile), linefile->GetLeftLine(), linefile->GetLeftCol(), linefile->GetRightLine(), linefile->GetRightCol(), full_message.c_str());
|
log_verific_callback(int(msg_type), message_id, LineFile::GetFileName(linefile),
|
||||||
|
linefile ? linefile->GetLeftLine() : 0, linefile ? linefile->GetLeftCol() : 0,
|
||||||
|
linefile ? linefile->GetRightLine() : 0, linefile ? linefile->GetRightCol() : 0, full_message.c_str());
|
||||||
} else {
|
} else {
|
||||||
if (msg_type == VERIFIC_ERROR || msg_type == VERIFIC_WARNING || msg_type == VERIFIC_PROGRAM_ERROR)
|
if (msg_type == VERIFIC_ERROR || msg_type == VERIFIC_WARNING || msg_type == VERIFIC_PROGRAM_ERROR)
|
||||||
log_warning_noprefix("%s%s\n", message_prefix.c_str(), message.c_str());
|
log_warning_noprefix("%s%s\n", message_prefix.c_str(), message.c_str());
|
||||||
|
|
Loading…
Reference in New Issue