Skip to content

Commit

Permalink
Declare map as static
Browse files Browse the repository at this point in the history
Signed-off-by: Ryszard Rozak <[email protected]>
  • Loading branch information
RRozak committed Jan 14, 2025
1 parent 43a75d5 commit 04cb1c6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/V3EmitCFunc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ constexpr int VL_VALUE_STRING_MAX_WIDTH = 8192;
//######################################################################
// EmitCFunc

std::map<string, int> EmitCFunc::m_indices;

bool EmitCFunc::emitSimpleOk(AstNodeExpr* nodep) {
// Can we put out a simple (A + B) instead of VL_ADD_III(A,B)?
if (nodep->emitSimpleOperator() == "") return false;
Expand Down
2 changes: 1 addition & 1 deletion src/V3EmitCFunc.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class EmitCLazyDecls final : public VNVisitorConst {

class EmitCFunc VL_NOT_FINAL : public EmitCConstInit {
VMemberMap m_memberMap;
std::map<string, int> m_indices;
static std::map<string, int> m_indices;
AstVarRef* m_wideTempRefp = nullptr; // Variable that _WW macros should be setting
int m_labelNum = 0; // Next label number
bool m_inUC = false; // Inside an AstUCStmt or AstUCExpr
Expand Down

0 comments on commit 04cb1c6

Please sign in to comment.