forked from github/verilator
Fix // in filenames, bug1610.
This commit is contained in:
parent
a86e1953eb
commit
99455a16bf
2
Changes
2
Changes
@ -22,6 +22,8 @@ The contributors that suggested a given feature are shown in []. Thanks!
|
|||||||
|
|
||||||
**** Fix VPI timed callbacks to be one-shot, pull5. [Matthew Ballance]
|
**** Fix VPI timed callbacks to be one-shot, pull5. [Matthew Ballance]
|
||||||
|
|
||||||
|
**** Fix // in filenames, bug1610. [Peter Nelson]
|
||||||
|
|
||||||
|
|
||||||
* Verilator 4.022 2019-11-10
|
* Verilator 4.022 2019-11-10
|
||||||
|
|
||||||
|
@ -1247,13 +1247,15 @@ void V3Options::parseOptsFile(FileLine* fl, const string& filename, bool rel) {
|
|||||||
// Strip simple comments
|
// Strip simple comments
|
||||||
string oline;
|
string oline;
|
||||||
// cppcheck-suppress StlMissingComparison
|
// cppcheck-suppress StlMissingComparison
|
||||||
for (string::const_iterator pos = line.begin(); pos != line.end(); ++pos) {
|
char lastch = ' ';
|
||||||
|
for (string::const_iterator pos = line.begin(); pos != line.end(); lastch = *pos++) {
|
||||||
if (inCmt) {
|
if (inCmt) {
|
||||||
if (*pos=='*' && *(pos+1)=='/') {
|
if (*pos=='*' && *(pos+1)=='/') {
|
||||||
inCmt = false;
|
inCmt = false;
|
||||||
++pos;
|
++pos;
|
||||||
}
|
}
|
||||||
} else if (*pos=='/' && *(pos+1)=='/') {
|
} else if (*pos=='/' && *(pos+1)=='/'
|
||||||
|
&& (pos == line.begin() || isspace(lastch))) { // But allow /file//path
|
||||||
break; // Ignore to EOL
|
break; // Ignore to EOL
|
||||||
} else if (*pos=='/' && *(pos+1)=='*') {
|
} else if (*pos=='/' && *(pos+1)=='*') {
|
||||||
inCmt = true;
|
inCmt = true;
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// Test that environment substitutions work
|
// Test that environment substitutions work
|
||||||
-f $VERILATOR_ROOT/test_regress/t/t_flag_f__2.vc
|
-f $VERILATOR_ROOT/test_regress/t/t_flag_f__2.vc
|
||||||
// Env var with .v file, and parens
|
// Env var with .v file, and parens
|
||||||
${VERILATOR_ROOT}/test_regress/t/t_flag_f__3.v
|
// Double slash below is intentional, as allowed in other tools
|
||||||
|
${VERILATOR_ROOT}/test_regress/t//t_flag_f__3.v
|
||||||
// Test -f
|
// Test -f
|
||||||
-F $VERILATOR_ROOT/test_regress/t/tsub/t_flag_f_tsub.vc
|
-F $VERILATOR_ROOT/test_regress/t/tsub/t_flag_f_tsub.vc
|
||||||
|
Loading…
Reference in New Issue
Block a user