3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-12-31 08:19:55 +00:00

Merge pull request #5535 from rocallahan/cleanup-prefix-strings

Delete prefix strings on shutdown to avoid triggering leak warnings.
This commit is contained in:
Emil J 2025-12-09 12:21:17 +01:00 committed by GitHub
commit 1af4f243af
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -299,8 +299,8 @@ RTLIL::IdString new_id_suffix(std::string_view file, int line, std::string_view
#define NEW_ID \
YOSYS_NAMESPACE_PREFIX RTLIL::IdString::new_autoidx_with_prefix([](std::string_view func) -> const std::string * { \
static const std::string *prefix = YOSYS_NAMESPACE_PREFIX create_id_prefix(__FILE__, __LINE__, func); \
return prefix; \
static std::unique_ptr<const std::string> prefix(YOSYS_NAMESPACE_PREFIX create_id_prefix(__FILE__, __LINE__, func)); \
return prefix.get(); \
}(__FUNCTION__))
#define NEW_ID_SUFFIX(suffix) \
YOSYS_NAMESPACE_PREFIX new_id_suffix(__FILE__, __LINE__, __FUNCTION__, suffix)