mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Include revert strings in IR
This commit is contained in:
committed by
chriseth
parent
f9bfceccd1
commit
7c7fd22062
@@ -2364,7 +2364,7 @@ void IRGeneratorForStatements::appendExternalFunctionCall(
|
||||
}
|
||||
|
||||
Whiskers templ(R"(
|
||||
if iszero(extcodesize(<address>)) { revert(0, 0) }
|
||||
if iszero(extcodesize(<address>)) { <revertNoCode> }
|
||||
|
||||
// storage for arguments and returned data
|
||||
let <pos> := <freeMemory>
|
||||
@@ -2389,6 +2389,7 @@ void IRGeneratorForStatements::appendExternalFunctionCall(
|
||||
<?+retVars> <retVars> := </+retVars> <abiDecode>(<pos>, add(<pos>, <returnSize>))
|
||||
}
|
||||
)");
|
||||
templ("revertNoCode", m_context.revertReasonIfDebug("Target contract does not contain code"));
|
||||
templ("pos", m_context.newYulVariable());
|
||||
templ("end", m_context.newYulVariable());
|
||||
if (_functionCall.annotation().tryCall)
|
||||
|
||||
Reference in New Issue
Block a user