Merge branch 'master' into clifford/ids
[yosys.git] / kernel / yosys.cc
index 5a53f90fddabf71a9098559307a6689ea61bd2c0..747f2d739fbf4b835ae1bfb869954d709b99c47d 100644 (file)
@@ -510,10 +510,13 @@ void yosys_setup()
        if(already_setup)
                return;
        already_setup = true;
-       // if there are already IdString objects then we have a global initialization order bug
-       IdString empty_id;
-       log_assert(empty_id.index_ == 0);
-       IdString::get_reference(empty_id.index_);
+
+       RTLIL::ID::A = "\\A";
+       RTLIL::ID::B = "\\B";
+       RTLIL::ID::Y = "\\Y";
+       RTLIL::ID::keep = "\\keep";
+       RTLIL::ID::whitebox = "\\whitebox";
+       RTLIL::ID::blackbox = "\\blackbox";
 
        #ifdef WITH_PYTHON
                PyImport_AppendInittab((char*)"libyosys", INIT_MODULE);
@@ -575,9 +578,6 @@ void yosys_shutdown()
 #ifdef WITH_PYTHON
        Py_Finalize();
 #endif
-
-       IdString empty_id;
-       IdString::put_reference(empty_id.index_);
 }
 
 RTLIL::IdString new_id(std::string file, int line, std::string func)