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

Method getFunction

src/Design/DesignComponent.cpp:153–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

151}
152
153Function* DesignComponent::getFunction(std::string_view name) const {
154 FunctionMap::const_iterator itr = m_functions.find(name);
155 if (itr == m_functions.end()) {
156 const DesignComponent* parent =
157 valuedcomponenti_cast<const DesignComponent*>(getParentScope());
158 if (parent) {
159 return parent->getFunction(name);
160 } else
161 return nullptr;
162 } else {
163 return (*itr).second;
164 }
165}
166
167void DesignComponent::insertFunction(Function* p) {
168 m_functions.emplace(p->getName(), p);

Callers 5

checkValidFunctionFunction · 0.45
checkValidBuiltinClass_Function · 0.45
bindSubRoutineCall_Method · 0.45
compileMethod · 0.45
compile_class_method_Method · 0.45

Calls

no outgoing calls

Tested by 3

checkValidFunctionFunction · 0.36
checkValidBuiltinClass_Function · 0.36
bindSubRoutineCall_Method · 0.36