summaryrefslogtreecommitdiff
path: root/passes/opt
diff options
context:
space:
mode:
Diffstat (limited to 'passes/opt')
-rw-r--r--passes/opt/opt_clean.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/passes/opt/opt_clean.cc b/passes/opt/opt_clean.cc
index 983e5d5f..c6ca8c25 100644
--- a/passes/opt/opt_clean.cc
+++ b/passes/opt/opt_clean.cc
@@ -122,10 +122,10 @@ static bool check_public_name(RTLIL::IdString id)
{
if (id[0] == '$')
return false;
-#if 0
+ if (id.substr(0, 2) == "\\_" && (id[id.size()-1] == '_' || id.find("_[") != std::string::npos))
+ return false;
if (id.find(".$") != std::string::npos)
return false;
-#endif
return true;
}