spirv-fuzz: Fix FuzzerPassCopyObjects (#3638)

Fixes #3637.
This commit is contained in:
Vasyl Teliman 2020-08-05 13:54:11 +03:00 committed by GitHub
parent 8bc27a1cfb
commit 28f32ca53e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,13 +54,13 @@ void FuzzerPassCopyObjects::Apply() {
return; return;
} }
std::vector<opt::Instruction*> relevant_instructions = const auto relevant_instructions = FindAvailableInstructions(
FindAvailableInstructions( function, block, inst_it,
function, block, inst_it, [this](opt::IRContext* ir_context, opt::Instruction* inst) {
[this](opt::IRContext* ir_context, opt::Instruction* inst) { return TransformationAddSynonym::IsInstructionValid(
return fuzzerutil::CanMakeSynonymOf( ir_context, *GetTransformationContext(), inst,
ir_context, *GetTransformationContext(), inst); protobufs::TransformationAddSynonym::COPY_OBJECT);
}); });
// At this point, |relevant_instructions| contains all the instructions // At this point, |relevant_instructions| contains all the instructions
// we might think of copying. // we might think of copying.