diff --git a/solc/CommandLineInterface.cpp b/solc/CommandLineInterface.cpp index fcfcbc010..5b820f988 100644 --- a/solc/CommandLineInterface.cpp +++ b/solc/CommandLineInterface.cpp @@ -1267,13 +1267,15 @@ void CommandLineInterface::assembleYul(yul::YulStack::Language _language, yul::Y for (auto const& [name, index]: sourceIndices) if (max_index < index) max_index = index; - vector sourceList(max_index + 1, ""); + vector sourceList(max_index + 1); + uint32_t counter{0}; + for (auto& source: sourceList) + source = "unknown-source-" + std::to_string(counter++); for (auto const& [name, index]: sourceIndices) sourceList[index] = name; - assembly->setSourceList(sourceList); sout() << util::jsonPrint( removeNullMembers( - assembly->assemblyJSON() + assembly->assemblyJSON(sourceList) ), m_options.formatting.json ) << endl;