| 633 | } |
| 634 | |
| 635 | void collectUsedFileContents(std::set<const FileContent*>& files, |
| 636 | std::set<std::string_view>& moduleNames, |
| 637 | ModuleInstance* instance) { |
| 638 | if (instance) { |
| 639 | DesignComponent* def = instance->getDefinition(); |
| 640 | if (def) { |
| 641 | moduleNames.emplace(def->getName()); |
| 642 | for (auto file : def->getFileContents()) { |
| 643 | if (file) files.insert(file); |
| 644 | } |
| 645 | } |
| 646 | for (uint32_t index = 0; index < instance->getNbChildren(); index++) { |
| 647 | collectUsedFileContents(files, moduleNames, instance->getChildren(index)); |
| 648 | } |
| 649 | } |
| 650 | } |
| 651 | |
| 652 | bool UhdmChecker::check(PathId uhdmFileId) { |
| 653 | FileSystem* const fileSystem = FileSystem::getInstance(); |
no test coverage detected