From 9d749841633f32c424f22acb37620f848ea111ce Mon Sep 17 00:00:00 2001 From: Geza Lore Date: Tue, 4 Nov 2025 13:50:28 +0000 Subject: [PATCH] Fix non-deterministic output when splitting Syms file --- src/V3EmitCSyms.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/V3EmitCSyms.cpp b/src/V3EmitCSyms.cpp index 118ae0d61..f5d54ba9a 100644 --- a/src/V3EmitCSyms.cpp +++ b/src/V3EmitCSyms.cpp @@ -105,7 +105,7 @@ class EmitCSyms final : EmitCBaseVisitorConst { size_t m_funcNum = 0; // CFunc split function number V3OutCFile* m_ofpBase = nullptr; // Base (not split) C file AstCFile* m_ofpBaseFile = nullptr; // Base (not split) AstCFile - std::unordered_map m_usesVfinal; // Split method uses __Vfinal + std::vector> m_usesVfinal; // Split file index + uses __Vfinal VDouble0 m_statVarScopeBytes; // Statistic tracking const std::string m_symsFileBase = v3Global.opt.makeDir() + "/" + symClassName(); @@ -620,7 +620,7 @@ void EmitCSyms::checkSplit(bool usesVfinal) { puts(");\n"); // Create new split file - m_usesVfinal[funcNum] = usesVfinal; + m_usesVfinal.emplace_back(funcNum, usesVfinal); const std::string filename = m_symsFileBase + "__" + std::to_string(funcNum) + ".cpp"; AstCFile* const cfilep = newCFile(filename, true /*slow*/, true /*source*/); cfilep->support(true);