MCPcopy Create free account
hub / github.com/chipsalliance/Surelog / collectUsedFileContents

Function collectUsedFileContents

src/DesignCompile/UhdmChecker.cpp:635–650  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

633}
634
635void 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
652bool UhdmChecker::check(PathId uhdmFileId) {
653 FileSystem* const fileSystem = FileSystem::getInstance();

Callers 1

checkMethod · 0.85

Calls 5

insertMethod · 0.80
getNbChildrenMethod · 0.80
getChildrenMethod · 0.80
getDefinitionMethod · 0.45
getNameMethod · 0.45

Tested by

no test coverage detected