| 1041 | } |
| 1042 | |
| 1043 | std::optional<Json> CompilerStack::yulCFGJson(std::string const& _contractName) const |
| 1044 | { |
| 1045 | solAssert(m_stackState == CompilationSuccessful, "Compilation was not successful."); |
| 1046 | solUnimplementedAssert(!isExperimentalSolidity()); |
| 1047 | |
| 1048 | // NOTE: Intentionally not using LazyInit. The artifact can get very large and we don't want to |
| 1049 | // keep it around when compiling a large project containing many contracts. |
| 1050 | Contract const& currentContract = contract(_contractName); |
| 1051 | yulAssert(currentContract.contract); |
| 1052 | yulAssert(currentContract.yulIROptimized.has_value() == currentContract.contract->canBeDeployed()); |
| 1053 | if (!currentContract.yulIROptimized) |
| 1054 | return std::nullopt; |
| 1055 | return loadGeneratedIR(*currentContract.yulIROptimized).cfgJson(); |
| 1056 | } |
| 1057 | |
| 1058 | std::optional<std::string> const& CompilerStack::yulIROptimized(std::string const& _contractName) const |
| 1059 | { |
no test coverage detected