| 756 | } |
| 757 | |
| 758 | CompilerStack::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 | |
| 780 | bool CompilerStack::compile(State _stopAfter) |
| 781 | { |
nothing calls this directly
no test coverage detected