| 130 | } |
| 131 | |
| 132 | void FileContent::insertObjectLookup(std::string_view name, NodeId id, |
| 133 | ErrorContainer* errors) { |
| 134 | NameIdMap::iterator itr = m_objectLookup.find(name); |
| 135 | if (itr == m_objectLookup.end()) { |
| 136 | m_objectLookup.emplace(name, id); |
| 137 | } else { |
| 138 | Location loc(getFileId(id), Line(id), Column(id), |
| 139 | errors->getSymbolTable()->registerSymbol(name)); |
| 140 | Location loc2(getFileId(itr->second), Line(itr->second), |
| 141 | Column(itr->second)); |
| 142 | Error err(ErrorDefinition::COMP_MULTIPLY_DEFINED_DESIGN_UNIT, loc, loc2); |
| 143 | errors->addError(err); |
| 144 | } |
| 145 | } |
| 146 | |
| 147 | const ModuleDefinition* FileContent::getModuleDefinition( |
| 148 | std::string_view moduleName) const { |
no test coverage detected