mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add protection against mixing "viaIR" and "non-viaIR".
This commit is contained in:
parent
bcdaa0c729
commit
9f8406ad37
@ -741,9 +741,10 @@ Json::Value CompilerStack::generatedSources(string const& _contractName, bool _r
|
||||
return sources.init([&]{
|
||||
Json::Value sources{Json::arrayValue};
|
||||
// If there is no compiler, then no bytecode was generated and thus no
|
||||
// sources were generated.
|
||||
// sources were generated (or we compiled "via IR").
|
||||
if (c.compiler)
|
||||
{
|
||||
solAssert(!m_viaIR, "");
|
||||
string source =
|
||||
_runtime ?
|
||||
c.compiler->runtimeGeneratedYulUtilityCode() :
|
||||
@ -1251,6 +1252,7 @@ void CompilerStack::compileContract(
|
||||
map<ContractDefinition const*, shared_ptr<Compiler const>>& _otherCompilers
|
||||
)
|
||||
{
|
||||
solAssert(!m_viaIR, "");
|
||||
solAssert(m_stackState >= AnalysisPerformed, "");
|
||||
if (m_hasError)
|
||||
BOOST_THROW_EXCEPTION(CompilerError() << errinfo_comment("Called compile with errors."));
|
||||
|
Loading…
Reference in New Issue
Block a user