diff --git a/src/V3Global.cpp b/src/V3Global.cpp index 98129ae78..cb42337e4 100644 --- a/src/V3Global.cpp +++ b/src/V3Global.cpp @@ -27,9 +27,12 @@ #include "V3Stats.h" //###################################################################### -// V3 Class -- top level +// V3Global -AstNetlist* V3Global::makeNetlist() { return new AstNetlist(); } +void V3Global::boot() { + UASSERT(!m_rootp, "call once"); + m_rootp = new AstNetlist(); +} void V3Global::clear() { #ifdef VL_LEAK_CHECK diff --git a/src/V3Global.h b/src/V3Global.h index 84a75d7e2..a7b54e866 100644 --- a/src/V3Global.h +++ b/src/V3Global.h @@ -119,11 +119,7 @@ public: // CONSTRUCTORS V3Global() {} - AstNetlist* makeNetlist(); - void boot() { - UASSERT(!m_rootp, "call once"); - m_rootp = makeNetlist(); - } + void boot(); void clear(); void shutdown(); // Release allocated resorces // ACCESSORS (general) diff --git a/src/V3PreShell.cpp b/src/V3PreShell.cpp index 6d64c4b7f..4b817a53b 100644 --- a/src/V3PreShell.cpp +++ b/src/V3PreShell.cpp @@ -49,9 +49,8 @@ protected: return level; } - void boot(char** env) { + void boot() { // Create the implementation pointer - if (env) {} if (!s_preprocp) { FileLine* const cmdfl = new FileLine(FileLine::commandLineFilename()); s_preprocp = V3PreProc::createPreProc(cmdfl); @@ -162,7 +161,7 @@ VInFilter* V3PreShellImp::s_filterp = nullptr; //###################################################################### // V3PreShell -void V3PreShell::boot(char** env) { V3PreShellImp::s_preImp.boot(env); } +void V3PreShell::boot() { V3PreShellImp::s_preImp.boot(); } bool V3PreShell::preproc(FileLine* fl, const string& modname, VInFilter* filterp, V3ParseImp* parsep, const string& errmsg) { return V3PreShellImp::s_preImp.preproc(fl, modname, filterp, parsep, errmsg); diff --git a/src/V3PreShell.h b/src/V3PreShell.h index 7e26f940f..9c7b73499 100644 --- a/src/V3PreShell.h +++ b/src/V3PreShell.h @@ -32,7 +32,7 @@ class VSpellCheck; class V3PreShell final { // Static class for calling preprocessor public: - static void boot(char** env); + static void boot(); static bool preproc(FileLine* fl, const string& modname, VInFilter* filterp, V3ParseImp* parsep, const string& errmsg); static void preprocInclude(FileLine* fl, const string& modname); diff --git a/src/Verilator.cpp b/src/Verilator.cpp index 97e3393c4..f503ee6b9 100644 --- a/src/Verilator.cpp +++ b/src/Verilator.cpp @@ -716,7 +716,7 @@ int main(int argc, char** argv, char** env) { // Preprocessor // Before command parsing so we can handle -Ds on command line. - V3PreShell::boot(env); + V3PreShell::boot(); // Command option parsing v3Global.opt.bin(argv[0]);