Merge remote-tracking branch 'origin/develop' into breaking

This commit is contained in:
chriseth
2020-11-17 18:51:57 +01:00
141 changed files with 2354 additions and 1203 deletions
@@ -2658,22 +2658,22 @@ void IRGeneratorForStatements::writeToLValue(IRLValue const& _lvalue, IRVariable
std::visit(
util::GenericVisitor{
[&](IRLValue::Storage const& _storage) {
std::optional<unsigned> offset;
string offsetArgument;
optional<unsigned> offsetStatic;
if (std::holds_alternative<unsigned>(_storage.offset))
offset = std::get<unsigned>(_storage.offset);
std::visit(GenericVisitor{
[&](unsigned _offset) { offsetStatic = _offset; },
[&](string const& _offset) { offsetArgument = ", " + _offset; }
}, _storage.offset);
m_code <<
m_utils.updateStorageValueFunction(_value.type(), _lvalue.type, offset) <<
m_utils.updateStorageValueFunction(_value.type(), _lvalue.type, offsetStatic) <<
"(" <<
_storage.slot <<
(
std::holds_alternative<string>(_storage.offset) ?
(", " + std::get<string>(_storage.offset)) :
""
) <<
offsetArgument <<
_value.commaSeparatedListPrefixed() <<
")\n";
},
[&](IRLValue::Memory const& _memory) {
if (_lvalue.type.isValueType())