Optimize repeated function call during symbol table init (#6665)

This commit is contained in:
Geza Lore
2025-11-08 16:48:00 -05:00
committed by GitHub
parent c493982511
commit 107776f324
3 changed files with 10 additions and 8 deletions
+2 -2
View File
@@ -552,7 +552,7 @@ void EmitCSyms::emitSymHdr() {
for (const std::string& funcName : m_splitFuncNames) { puts("void " + funcName + "();\n"); }
puts("\n// METHODS\n");
puts("const char* name() { return TOP.vlNamep; }\n");
puts("const char* name() const { return TOP.vlNamep; }\n");
if (v3Global.hasEvents()) {
if (v3Global.assignsEvents()) {
@@ -736,7 +736,7 @@ std::vector<std::string> EmitCSyms::getSymCtorStmts() {
for (const auto& itpair : m_scopeNames) {
const ScopeData& sd = itpair.second;
std::string stmt;
stmt += protect("__Vscopep_" + sd.m_symName) + " = new VerilatedScope{this, name(), \"";
stmt += protect("__Vscopep_" + sd.m_symName) + " = new VerilatedScope{this, \"";
stmt += V3OutFormatter::quoteNameControls(
VIdProtect::protectWordsIf(sd.m_prettyName, true));
stmt += "\", \"";