projects
/
yosys.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6c5049f
)
Add optional nullstr argument to log_id()
author
Clifford Wolf
<clifford@clifford.at>
Sun, 13 Jan 2019 16:00:58 +0000
(17:00 +0100)
committer
Clifford Wolf
<clifford@clifford.at>
Tue, 15 Jan 2019 10:06:48 +0000
(11:06 +0100)
Signed-off-by: Clifford Wolf <clifford@clifford.at>
kernel/log.h
patch
|
blob
|
history
diff --git
a/kernel/log.h
b/kernel/log.h
index e1f54a197906a7186c01b686247c4044f7f2b8d8..759939025bc41862e41782859e2005853ffcc47b 100644
(file)
--- a/
kernel/log.h
+++ b/
kernel/log.h
@@
-94,7
+94,9
@@
const char *log_signal(const RTLIL::SigSpec &sig, bool autoint = true);
const char *log_const(const RTLIL::Const &value, bool autoint = true);
const char *log_id(RTLIL::IdString id);
-template<typename T> static inline const char *log_id(T *obj) {
+template<typename T> static inline const char *log_id(T *obj, const char *nullstr = nullptr) {
+ if (nullstr && obj == nullptr)
+ return nullstr;
return log_id(obj->name);
}