| 1487 | } |
| 1488 | |
| 1489 | bool CommandLineParser::checkCommandLine_() { |
| 1490 | FileSystem* const fileSystem = FileSystem::getInstance(); |
| 1491 | bool noError = true; |
| 1492 | for (const auto& fid : m_sourceFiles) { |
| 1493 | if (!fileSystem->isRegularFile(fid)) { |
| 1494 | Location loc(fid); |
| 1495 | Error err(ErrorDefinition::CMD_VERILOG_FILE_DOES_NOT_EXIST, loc); |
| 1496 | m_errors->addError(err); |
| 1497 | noError = false; |
| 1498 | } |
| 1499 | } |
| 1500 | for (const auto& did : m_libraryPaths) { |
| 1501 | if (!fileSystem->isDirectory(did)) { |
| 1502 | Location loc(did); |
| 1503 | Error err(ErrorDefinition::CMD_LIBRARY_PATH_DOES_NOT_EXIST, loc); |
| 1504 | m_errors->addError(err); |
| 1505 | } |
| 1506 | } |
| 1507 | for (const auto& fid : m_libraryFiles) { |
| 1508 | if (!fileSystem->isRegularFile(fid)) { |
| 1509 | Location loc(fid); |
| 1510 | Error err(ErrorDefinition::CMD_LIBRARY_FILE_DOES_NOT_EXIST, loc); |
| 1511 | m_errors->addError(err); |
| 1512 | noError = false; |
| 1513 | } |
| 1514 | } |
| 1515 | for (const auto& did : m_includePaths) { |
| 1516 | if (!fileSystem->isDirectory(did)) { |
| 1517 | Location loc(did); |
| 1518 | Error err(ErrorDefinition::CMD_INCLUDE_PATH_DOES_NOT_EXIST, loc); |
| 1519 | m_errors->addError(err); |
| 1520 | } |
| 1521 | } |
| 1522 | if (!m_errors->printMessages(m_muteStdout)) { |
| 1523 | noError = false; |
| 1524 | } |
| 1525 | |
| 1526 | return noError; |
| 1527 | } |
| 1528 | |
| 1529 | bool CommandLineParser::isSVFile(PathId fileId) const { |
| 1530 | return fileId && (m_svSourceFiles.find(fileId) != m_svSourceFiles.end()); |
nothing calls this directly
no test coverage detected