Skip to content

Commit

Permalink
If "p4include" is in the path, treat the file as system file.
Browse files Browse the repository at this point in the history
  • Loading branch information
fruffy committed Jun 23, 2024
1 parent 32e7396 commit 01edfdd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontends/p4/toP4/toP4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ void ToP4::end_apply(const IR::Node *) {
// Try to guess whether a file is a "system" file
bool ToP4::isSystemFile(cstring file) {
if (noIncludes) return false;
if (file.startsWith(p4includePath)) return true;
if (file.startsWith(p4includePath) || file.find("p4include") != nullptr) return true;
return false;
}

Expand Down

0 comments on commit 01edfdd

Please sign in to comment.