Add --public-ignore to ignore public metacomments (#7819)

This commit is contained in:
Andrew Nolte
2025-01-11 12:29:39 -05:00
committed by Wilson Snyder
parent 28a59a2b21
commit f8dd65c7cd
9 changed files with 67 additions and 12 deletions
+1 -1
View File
@@ -486,7 +486,7 @@ void V3PreProcImp::comment(const string& text) {
//}
// else ignore the comment we don't recognize
} // else no assertions
} else if (vlcomment) {
} else if (vlcomment && !(v3Global.opt.publicOff() && VString::startsWith(cmd, "public"))) {
if (VString::startsWith(cmd, "public_flat_rw")) {
// "/*verilator public_flat_rw @(foo) */" -> "/*verilator public_flat_rw*/ @(foo)"
string::size_type endOfCmd = std::strlen("public_flat_rw");