diff --git a/source/reduce/reducer.cpp b/source/reduce/reducer.cpp index 18eeaeb66..16bb94fe6 100644 --- a/source/reduce/reducer.cpp +++ b/source/reduce/reducer.cpp @@ -54,10 +54,10 @@ void Reducer::SetInterestingnessFunction( } Reducer::ReductionResultStatus Reducer::Run( - std::vector&& binary_in, std::vector* binary_out, + const std::vector& binary_in, std::vector* binary_out, spv_const_reducer_options options, spv_validator_options validator_options) { - std::vector current_binary(std::move(binary_in)); + std::vector current_binary(binary_in); spvtools::SpirvTools tools(target_env_); assert(tools.IsValid() && "Failed to create SPIRV-Tools interface"); @@ -138,13 +138,13 @@ void Reducer::AddDefaultReductionPasses() { } void Reducer::AddReductionPass( - std::unique_ptr&& finder) { + std::unique_ptr finder) { passes_.push_back( spvtools::MakeUnique(target_env_, std::move(finder))); -} +} void Reducer::AddCleanupReductionPass( - std::unique_ptr&& finder) { + std::unique_ptr finder) { cleanup_passes_.push_back( spvtools::MakeUnique(target_env_, std::move(finder))); } diff --git a/source/reduce/reducer.h b/source/reduce/reducer.h index 864ce7570..f3ba18066 100644 --- a/source/reduce/reducer.h +++ b/source/reduce/reducer.h @@ -84,17 +84,17 @@ class Reducer { // Adds a reduction pass based on the given finder to the sequence of passes // that will be iterated over. - void AddReductionPass(std::unique_ptr&& finder); + void AddReductionPass(std::unique_ptr finder); // Adds a cleanup reduction pass based on the given finder to the sequence of // passes that will run after other passes. void AddCleanupReductionPass( - std::unique_ptr&& finder); + std::unique_ptr finder); // Reduces the given SPIR-V module |binary_out|. // The reduced binary ends up in |binary_out|. // A status is returned. - ReductionResultStatus Run(std::vector&& binary_in, + ReductionResultStatus Run(const std::vector& binary_in, std::vector* binary_out, spv_const_reducer_options options, spv_validator_options validator_options);