diff options
Diffstat (limited to 'libsolidity/interface/StandardCompiler.cpp')
-rw-r--r-- | libsolidity/interface/StandardCompiler.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/libsolidity/interface/StandardCompiler.cpp b/libsolidity/interface/StandardCompiler.cpp index 6415e732..137a4439 100644 --- a/libsolidity/interface/StandardCompiler.cpp +++ b/libsolidity/interface/StandardCompiler.cpp @@ -764,14 +764,18 @@ Json::Value StandardCompiler::compileInternal(Json::Value const& _input) m_compilerStack.runtimeSourceMapping(contractName) ); - contractData["evm"] = evmData; + if (!evmData.empty()) + contractData["evm"] = evmData; - if (!contractsOutput.isMember(file)) - contractsOutput[file] = Json::objectValue; - - contractsOutput[file][name] = contractData; + if (!contractData.empty()) + { + if (!contractsOutput.isMember(file)) + contractsOutput[file] = Json::objectValue; + contractsOutput[file][name] = contractData; + } } - output["contracts"] = contractsOutput; + if (!contractsOutput.empty()) + output["contracts"] = contractsOutput; return output; } |