projects
/
yosys.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
014a41f
)
Added ID() macro for static IdStrings
author
Clifford Wolf
<clifford@clifford.at>
Sun, 3 Aug 2014 12:59:13 +0000
(14:59 +0200)
committer
Clifford Wolf
<clifford@clifford.at>
Sun, 3 Aug 2014 12:59:13 +0000
(14:59 +0200)
kernel/yosys.h
patch
|
blob
|
history
diff --git
a/kernel/yosys.h
b/kernel/yosys.h
index 34777c9a490eff7dbb1e138f15802f66555d33ce..f9bbc0e44ee4a8acb0da58df1fa80de10cd98523 100644
(file)
--- a/
kernel/yosys.h
+++ b/
kernel/yosys.h
@@
-103,6
+103,9
@@
RTLIL::IdString new_id(std::string file, int line, std::string func);
#define NEW_ID \
YOSYS_NAMESPACE_PREFIX new_id(__FILE__, __LINE__, __FUNCTION__)
+#define ID(_str) \
+ ([]() { static YOSYS_NAMESPACE_PREFIX RTLIL::IdString _id(_str); return _id; })()
+
RTLIL::Design *yosys_get_design();
std::string proc_self_dirname();
std::string proc_share_dirname();