mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-06 06:03:23 +00:00
Fixed log_id() memory corruption
This commit is contained in:
parent
efd9604dfb
commit
02f0acb3bc
2 changed files with 10 additions and 5 deletions
|
@ -51,13 +51,10 @@ void log_reset_stack();
|
|||
void log_flush();
|
||||
|
||||
const char *log_signal(const RTLIL::SigSpec &sig, bool autoint = true);
|
||||
|
||||
static inline const char *log_id(std::string id) {
|
||||
return RTLIL::id2cstr(id);
|
||||
}
|
||||
const char *log_id(std::string id);
|
||||
|
||||
template<typename T> static inline const char *log_id(T *obj) {
|
||||
return RTLIL::id2cstr(obj->name);
|
||||
return log_id(obj->name);
|
||||
}
|
||||
|
||||
#define log_abort() log_error("Abort in %s:%d.\n", __FILE__, __LINE__)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue