From 8b8939e21943d094c36290e393a1bc1009a75214 Mon Sep 17 00:00:00 2001 From: Robert O'Callahan Date: Thu, 9 Oct 2025 22:54:26 +0000 Subject: [PATCH] Make RTLIL::Design::get_all_designs() unconditionally defined --- kernel/rtlil.cc | 6 ------ kernel/rtlil.h | 2 -- 2 files changed, 8 deletions(-) diff --git a/kernel/rtlil.cc b/kernel/rtlil.cc index c01cde61a..14a0f99a1 100644 --- a/kernel/rtlil.cc +++ b/kernel/rtlil.cc @@ -1084,9 +1084,7 @@ RTLIL::Design::Design() refcount_modules_ = 0; push_full_selection(); -#ifdef YOSYS_ENABLE_PYTHON RTLIL::Design::get_all_designs()->insert(std::pair(hashidx_, this)); -#endif } RTLIL::Design::~Design() @@ -1095,18 +1093,14 @@ RTLIL::Design::~Design() delete pr.second; for (auto n : bindings_) delete n; -#ifdef YOSYS_ENABLE_PYTHON RTLIL::Design::get_all_designs()->erase(hashidx_); -#endif } -#ifdef YOSYS_ENABLE_PYTHON static std::map all_designs; std::map *RTLIL::Design::get_all_designs(void) { return &all_designs; } -#endif RTLIL::ObjRange RTLIL::Design::modules() { diff --git a/kernel/rtlil.h b/kernel/rtlil.h index 47ab6f06c..9c9ea6525 100644 --- a/kernel/rtlil.h +++ b/kernel/rtlil.h @@ -1700,9 +1700,7 @@ struct RTLIL::Design // returns all selected unboxed whole modules, warning the user if any // partially selected or boxed modules have been ignored std::vector selected_unboxed_whole_modules_warn() const { return selected_modules(SELECT_WHOLE_WARN, SB_UNBOXED_WARN); } -#ifdef YOSYS_ENABLE_PYTHON static std::map *get_all_designs(void); -#endif }; struct RTLIL::Module : public RTLIL::NamedObject