FunctionType also gets CanonicalSignature

- also using iterators in the signature creation function
This commit is contained in:
Lefteris Karapetsas
2015-01-07 02:27:05 +01:00
parent b2aa3baded
commit 24d7bdd3a9
3 changed files with 15 additions and 11 deletions
+11
View File
@@ -452,6 +452,17 @@ unsigned FunctionType::getSizeOnStack() const
}
}
std::string FunctionType::getCanonicalSignature() const
{
auto parameters = getParameterTypes();
std::string ret = "NAME("; //TODO: how to get function name from FunctionType
for (auto it = parameters.cbegin(); it != parameters.cend(); ++it)
ret += (*it)->toString() + (it + 1 == m_parameterTypes.end() ? "" : ",");
return ret + ")";
}
bool MappingType::operator==(Type const& _other) const
{
if (_other.getCategory() != getCategory())