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

This commit is contained in:
chriseth
2020-12-09 15:24:49 +01:00
51 changed files with 481 additions and 340 deletions
+1
View File
@@ -94,6 +94,7 @@ struct SourceUnitAnnotation: ASTAnnotation
SetOnce<std::map<ASTString, std::vector<Declaration const*>>> exportedSymbols;
/// Experimental features.
std::set<ExperimentalFeature> experimentalFeatures;
/// Using the new ABI coder. Set to `false` if using ABI coder v1.
SetOnce<bool> useABICoderV2;
};
+8
View File
@@ -1249,6 +1249,14 @@ void CompilerStack::generateIR(ContractDefinition const& _contract)
if (!compiledContract.yulIR.empty())
return;
if (!*_contract.sourceUnit().annotation().useABICoderV2)
m_errorReporter.warning(
2066_error,
_contract.location(),
"Contract requests the ABI coder v1, which is incompatible with the IR. "
"Using ABI coder v2 instead."
);
string dependenciesSource;
for (auto const* dependency: _contract.annotation().contractDependencies)
generateIR(*dependency);