Move LiteralString::toString from the header

This commit is contained in:
Alex Beregszaszi 2016-08-05 10:48:09 +01:00
parent 539afbeea3
commit bf76321c9e
2 changed files with 6 additions and 1 deletions

View File

@ -852,6 +852,11 @@ bool StringLiteralType::operator==(const Type& _other) const
return m_value == dynamic_cast<StringLiteralType const&>(_other).m_value;
}
std::string StringLiteralType::toString(bool) const
{
return "literal_string \"" + m_value + "\"";
}
TypePointer StringLiteralType::mobileType() const
{
return make_shared<ArrayType>(DataLocation::Memory, true);

View File

@ -419,7 +419,7 @@ public:
virtual bool canLiveOutsideStorage() const override { return false; }
virtual unsigned sizeOnStack() const override { return 0; }
virtual std::string toString(bool) const override { return "literal_string \"" + m_value + "\""; }
virtual std::string toString(bool) const override;
virtual TypePointer mobileType() const override;
std::string const& value() const { return m_value; }