MCPcopy Create free account
hub / github.com/KhronosGroup/SPIRV-Tools / GetFunctionIterator

Function GetFunctionIterator

source/fuzz/fuzzer_util.cpp:2021–2028  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2019}
2020
2021opt::Module::iterator GetFunctionIterator(opt::IRContext* ir_context,
2022 uint32_t function_id) {
2023 return std::find_if(ir_context->module()->begin(),
2024 ir_context->module()->end(),
2025 [function_id](const opt::Function& f) {
2026 return f.result_id() == function_id;
2027 });
2028}
2029
2030// TODO(https://github.com/KhronosGroup/SPIRV-Tools/issues/3582): Add all
2031// opcodes that are agnostic to signedness of operands to function.

Callers 1

ApplyMethod · 0.85

Calls 4

beginMethod · 0.45
moduleMethod · 0.45
endMethod · 0.45
result_idMethod · 0.45

Tested by

no test coverage detected