From e7b6a7ef6a4e6644f2672aafd8ff358505e89336 Mon Sep 17 00:00:00 2001 From: Morten Borup Petersen Date: Mon, 28 Jun 2021 20:06:21 +0200 Subject: [PATCH] Fix shadowing of vlSymsp member with argument (#3046). This commit removes shadowing of the vlSymsp member of the emitted modules, allowing models to compile when -Werror=shadow is set. This may be useful when i.e., an external project which defines its own error flags depends on the verilated model. --- src/V3EmitC.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/V3EmitC.cpp b/src/V3EmitC.cpp index 4e2bacc49..386985aa5 100644 --- a/src/V3EmitC.cpp +++ b/src/V3EmitC.cpp @@ -339,9 +339,9 @@ void EmitCImp::emitConfigureImp(AstNodeModule* modp) { } puts("\nvoid " + modName + "::" + protect("__Vconfigure") + "(" + symClassName() - + "* vlSymsp, bool first) {\n"); + + "* _vlSymsp, bool first) {\n"); puts("if (false && first) {} // Prevent unused\n"); - puts("this->vlSymsp = vlSymsp;\n"); // First, as later stuff needs it. + puts("this->vlSymsp = _vlSymsp;\n"); // First, as later stuff needs it. if (v3Global.opt.coverage()) { puts(modName + "__" + protect("_configure_coverage") + "(this, first);\n"); }