| 2120 | } |
| 2121 | |
| 2122 | void CompilerStack::reportCodeGenerationError(Error const& _error, ContractDefinition const* _contractDefinition) |
| 2123 | { |
| 2124 | solAssert(_error.type() == Error::Type::CodeGenerationError); |
| 2125 | solAssert(_error.comment(), "Errors must include a message for the user."); |
| 2126 | if (_error.sourceLocation() && _error.sourceLocation()->sourceName) |
| 2127 | solAssert(m_sources.count(*_error.sourceLocation()->sourceName) != 0); |
| 2128 | solAssert(_contractDefinition); |
| 2129 | |
| 2130 | m_errorReporter.codeGenerationError( |
| 2131 | _error.errorId(), |
| 2132 | (_error.sourceLocation() && _error.sourceLocation()->sourceName) ? |
| 2133 | *_error.sourceLocation() : |
| 2134 | _contractDefinition->location(), |
| 2135 | *_error.comment() |
| 2136 | ); |
| 2137 | } |
| 2138 | |
| 2139 | void CompilerStack::reportIRPostAnalysisError(Error const* _error, ContractDefinition const* _contractDefinition) |
| 2140 | { |
nothing calls this directly
no test coverage detected