Refactoring copyLiteralToMemoryFunction and reusing it from other functions.

Co-authored-by: Leonardo <leo@ethereum.org>

Co-authored-by: Alex Beregszaszi <alex@rtfs.hu>
This commit is contained in:
Djordje Mijovic
2020-12-30 17:31:20 +01:00
co-authored by Leonardo Alex Beregszaszi
parent b74c08143f
commit 047d693ac9
4 changed files with 37 additions and 47 deletions
@@ -1739,7 +1739,7 @@ void IRGeneratorForStatements::endVisit(MemberAccess const& _memberAccess)
{
TypePointer arg = dynamic_cast<MagicType const&>(*_memberAccess.expression().annotation().type).typeArgument();
ContractDefinition const& contract = dynamic_cast<ContractType const&>(*arg).contractDefinition();
define(IRVariable(_memberAccess)) << m_utils.copyToMemoryLiteralFunction(contract.name()) << "()\n";
define(IRVariable(_memberAccess)) << m_utils.copyLiteralToMemoryFunction(contract.name()) << "()\n";
}
else if (member == "interfaceId")
{