MCPcopy Create free account
hub / github.com/argotorg/solidity / requestedPipelineConfig

Method requestedPipelineConfig

libsolidity/interface/CompilerStack.cpp:758–778  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

756}
757
758CompilerStack::PipelineConfig CompilerStack::requestedPipelineConfig(ContractDefinition const& _contract) const
759{
760 static PipelineConfig constexpr defaultPipelineConfig = PipelineConfig{
761 false, // irCodegen
762 false, // irOptimization
763 true, // bytecode
764 };
765
766 // If nothing was explicitly selected, all contracts are selected by default.
767 if (m_selectedContracts.empty())
768 return defaultPipelineConfig;
769
770 PipelineConfig combinedConfig;
771 for (std::string const& sourceUnitName: {""s, _contract.sourceUnitName()})
772 if (m_selectedContracts.count(sourceUnitName) != 0)
773 for (std::string const& contractName: {""s, _contract.name()})
774 if (m_selectedContracts.at(sourceUnitName).count(contractName) != 0)
775 combinedConfig = combinedConfig | m_selectedContracts.at(sourceUnitName).at(contractName);
776
777 return combinedConfig;
778}
779
780bool CompilerStack::compile(State _stopAfter)
781{

Callers

nothing calls this directly

Calls 5

sourceUnitNameMethod · 0.80
atMethod · 0.80
emptyMethod · 0.45
countMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected