@@ -268,15 +268,30 @@ inline int GetSize(RTLIL::Wire *wire);
268268extern int autoidx;
269269extern int yosys_xtrace;
270270extern bool yosys_write_versions;
271+ extern bool yosys_private_id_locs;
271272
273+ RTLIL::IdString newer_id (std::string file, int line, std::string func);
274+ RTLIL::IdString newer_id_suffix (std::string file, int line, std::string func, std::string suffix);
275+ [[deprecated(" Use NEWER_ID instead of NEW_ID" )]]
272276RTLIL::IdString new_id (std::string file, int line, std::string func);
277+ [[deprecated(" Use NEWER_ID_SUFFIX instead of NEW_ID_SUFFIX" )]]
273278RTLIL::IdString new_id_suffix (std::string file, int line, std::string func, std::string suffix);
274279
275280#define NEW_ID \
276281 YOSYS_NAMESPACE_PREFIX new_id (__FILE__, __LINE__, __FUNCTION__)
277282#define NEW_ID_SUFFIX (suffix ) \
278283 YOSYS_NAMESPACE_PREFIX new_id_suffix (__FILE__, __LINE__, __FUNCTION__, suffix)
279284
285+ #define NEWER_ID \
286+ (YOSYS_NAMESPACE_PREFIX yosys_private_id_locs ? \
287+ YOSYS_NAMESPACE_PREFIX newer_id (__FILE__, __LINE__, __FUNCTION__) : \
288+ YOSYS_NAMESPACE_PREFIX newer_id(" ?" , 0 , " ?" ))
289+
290+ #define NEWER_ID_SUFFIX (suffix ) \
291+ (YOSYS_NAMESPACE_PREFIX yosys_private_id_locs ? \
292+ YOSYS_NAMESPACE_PREFIX newer_id_suffix (__FILE__, __LINE__, __FUNCTION__, suffix) : \
293+ YOSYS_NAMESPACE_PREFIX newer_id_suffix(" ?" , 0 , " ?" , suffix))
294+
280295namespace ID = RTLIL::ID;
281296
282297
0 commit comments