mirror of
https://github.com/YosysHQ/yosys
synced 2025-09-12 20:51:27 +00:00
Ensure the ID macro consistently uses YOSYS_NAMESPACE_PREFIX
The previous version of the ID macro used this for everything in the Yosys namespace, so the new version should continue to do so.
This commit is contained in:
parent
23af52c3c8
commit
2a4a9aedfe
1 changed files with 8 additions and 4 deletions
|
@ -544,10 +544,14 @@ template <> struct IDMacroHelper<-1> {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#define ID(_id) IDMacroHelper<lookup_well_known_id(#_id)>::eval([]() -> const RTLIL::IdString & { \
|
#define ID(_id) \
|
||||||
const char *p = "\\" #_id, *q = p[1] == '$' ? p+1 : p; \
|
YOSYS_NAMESPACE_PREFIX IDMacroHelper< \
|
||||||
static const YOSYS_NAMESPACE_PREFIX RTLIL::IdString id(q); \
|
YOSYS_NAMESPACE_PREFIX lookup_well_known_id(#_id) \
|
||||||
return id; \
|
>::eval([]() \
|
||||||
|
-> const YOSYS_NAMESPACE_PREFIX RTLIL::IdString & { \
|
||||||
|
const char *p = "\\" #_id, *q = p[1] == '$' ? p+1 : p; \
|
||||||
|
static const YOSYS_NAMESPACE_PREFIX RTLIL::IdString id(q); \
|
||||||
|
return id; \
|
||||||
})
|
})
|
||||||
|
|
||||||
namespace RTLIL {
|
namespace RTLIL {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue