diff options
Diffstat (limited to 'common/nextpnr.h')
-rw-r--r-- | common/nextpnr.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/common/nextpnr.h b/common/nextpnr.h index 5a0bd4b1..86e781ae 100644 --- a/common/nextpnr.h +++ b/common/nextpnr.h @@ -487,13 +487,23 @@ struct BaseCtx const Context *getCtx() const { return reinterpret_cast<const Context *>(this); } - template <typename T> const char *nameOf(const T *obj) + const char *nameOf(IdString name) const + { + return name.c_str(this); + } + + template <typename T> const char *nameOf(const T *obj) const { if (obj == nullptr) return ""; - return obj->name.c_str(getCtx()); + return obj->name.c_str(this); } + const char *nameOfBel(BelId bel) const; + const char *nameOfWire(WireId wire) const; + const char *nameOfPip(PipId pip) const; + const char *nameOfGroup(GroupId group) const; + // -------------------------------------------------------------- bool allUiReload = true; |