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

Method reduceNoCaseSwitch

libyul/optimiser/ControlFlowSimplifier.cpp:177–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175}
176
177OptionalStatements ControlFlowSimplifier::reduceNoCaseSwitch(Switch& _switchStmt) const
178{
179 yulAssert(_switchStmt.cases.empty(), "Expected no case!");
180 std::optional<BuiltinHandle> discardFunctionHandle =
181 m_dialect.discardFunctionHandle();
182 if (!discardFunctionHandle)
183 return {};
184
185 return make_vector<Statement>(makeDiscardCall(
186 debugDataOf(*_switchStmt.expression),
187 *discardFunctionHandle,
188 std::move(*_switchStmt.expression)
189 ));
190}
191
192OptionalStatements ControlFlowSimplifier::reduceSingleCaseSwitch(Switch& _switchStmt) const
193{

Callers

nothing calls this directly

Calls 4

makeDiscardCallFunction · 0.85
debugDataOfFunction · 0.85
emptyMethod · 0.45
discardFunctionHandleMethod · 0.45

Tested by

no test coverage detected