diff --git a/modules/cargo/include/cargo/small_vector.h b/modules/cargo/include/cargo/small_vector.h index c717bc516..5d6481dad 100644 --- a/modules/cargo/include/cargo/small_vector.h +++ b/modules/cargo/include/cargo/small_vector.h @@ -838,13 +838,7 @@ class small_vector { } std::copy(Begin, End, other.Begin); other.setEnd(other.Begin + size()); -#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ < 9 - // GCC <9 requires this redundant move, this branch of the #if can be - // deleted once the minimum supported version of GCC is at least 9. - return std::move(other); -#else return other; -#endif } private: diff --git a/modules/compiler/spirv-ll/source/context.cpp b/modules/compiler/spirv-ll/source/context.cpp index a5977b814..eba8ce2a5 100644 --- a/modules/compiler/spirv-ll/source/context.cpp +++ b/modules/compiler/spirv-ll/source/context.cpp @@ -1125,11 +1125,5 @@ cargo::expected spirv_ll::Context::translate( return cargo::make_unexpected(llvm::toString(std::move(err))); } -#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ < 9 - // GCC <9 requires this redundant move, this branch of the #if can be - // deleted once the minimum supported version of GCC is at least 9. - return std::move(module); -#else return module; -#endif } diff --git a/source/cl/source/buffer.cpp b/source/cl/source/buffer.cpp index 3bf5cf338..87ef00ce4 100644 --- a/source/cl/source/buffer.cpp +++ b/source/cl/source/buffer.cpp @@ -121,13 +121,7 @@ cargo::expected, cl_int> _cl_mem_buffer::create( } } -#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ < 9 - // GCC <9 requires this redundant move, this branch of the #if can be - // deleted once the minimum supported version of GCC is at least 9. - return std::move(buffer); -#else return buffer; -#endif } cl_int _cl_mem_buffer::synchronize(cl_command_queue command_queue) { diff --git a/source/cl/source/command_queue.cpp b/source/cl/source/command_queue.cpp index bdbc824d3..2ec7e46f5 100644 --- a/source/cl/source/command_queue.cpp +++ b/source/cl/source/command_queue.cpp @@ -116,13 +116,7 @@ _cl_command_queue::create(cl_context context, cl_device_id device, OCL_CHECK(nullptr == queue, return cargo::make_unexpected(CL_OUT_OF_HOST_MEMORY)); -#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ < 9 - // GCC <9 requires this redundant move, this branch of the #if can be - // deleted once the minimum supported version of GCC is at least 9. - return std::move(queue); -#else return queue; -#endif } // Used by clCreateCommandQueueWithProperties and @@ -194,13 +188,7 @@ _cl_command_queue::create(cl_context context, cl_device_id device, #endif } -#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ < 9 - // GCC <9 requires this redundant move, this branch of the #if can be - // deleted once the minimum supported version of GCC is at least 9. - return std::move(command_queue); -#else return command_queue; -#endif } cl_int _cl_command_queue::flush() { diff --git a/source/cl/source/extension/source/intel_unified_shared_memory/intel_unified_shared_memory.cpp b/source/cl/source/extension/source/intel_unified_shared_memory/intel_unified_shared_memory.cpp index 81fdffcff..2a9812e3f 100644 --- a/source/cl/source/extension/source/intel_unified_shared_memory/intel_unified_shared_memory.cpp +++ b/source/cl/source/extension/source/intel_unified_shared_memory/intel_unified_shared_memory.cpp @@ -63,13 +63,7 @@ cargo::expected parseProperties( current += 2; } while (current[0] != 0); } -#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ < 9 - // GCC <9 requires this redundant move, this branch of the #if can be - // deleted once the minimum supported version of GCC is at least 9. - return std::move(alloc_flags); -#else return alloc_flags; -#endif } allocation_info *findAllocation(const cl_context context, const void *ptr) { @@ -252,13 +246,7 @@ host_allocation_info::create(cl_context context, usm_alloc->alloc_flags = alloc_properties.value(); -#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ < 9 - // GCC <9 requires this redundant move, this branch of the #if can be - // deleted once the minimum supported version of GCC is at least 9. - return std::move(usm_alloc); -#else return usm_alloc; -#endif } cl_int host_allocation_info::allocate(cl_uint alignment) { @@ -371,13 +359,7 @@ device_allocation_info::create(cl_context context, cl_device_id device, usm_alloc->alloc_flags = alloc_properties.value(); -#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ < 9 - // GCC <9 requires this redundant move, this branch of the #if can be - // deleted once the minimum supported version of GCC is at least 9. - return std::move(usm_alloc); -#else return usm_alloc; -#endif } cl_int device_allocation_info::allocate(cl_uint alignment) { diff --git a/source/cl/source/extension/source/khr_command_buffer.cpp b/source/cl/source/extension/source/khr_command_buffer.cpp index 53d409d04..453c7dec1 100644 --- a/source/cl/source/extension/source/khr_command_buffer.cpp +++ b/source/cl/source/extension/source/khr_command_buffer.cpp @@ -145,13 +145,7 @@ _cl_mutable_command_khr::create(cl_uint id, cl_kernel kernel) { return cargo::make_unexpected(error); } -#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ < 9 - // GCC <9 requires this redundant move, this branch of the #if can be - // deleted once the minimum supported version of GCC is at least 9. - return std::move(mutable_command); -#else return mutable_command; -#endif } _cl_command_buffer_khr::_cl_command_buffer_khr(cl_command_queue queue) @@ -268,13 +262,7 @@ _cl_command_buffer_khr::create( } } -#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ < 9 - // GCC <9 requires this redundant move, this branch of the #if can be - // deleted once the minimum supported version of GCC is at least 9. - return std::move(command_buffer); -#else return command_buffer; -#endif } cl_command_buffer_state_khr _cl_command_buffer_khr::getState() const { @@ -340,13 +328,7 @@ _cl_command_buffer_khr::convertWaitList( return cargo::make_unexpected(CL_OUT_OF_HOST_MEMORY); } } -#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ < 9 - // GCC <9 requires this redundant move, this branch of the #if can be - // deleted once the minimum supported version of GCC is at least 9. - return std::move(command_wait_list); -#else return command_wait_list; -#endif } cl_int _cl_command_buffer_khr::commandBarrierWithWaitList( diff --git a/source/cl/source/program.cpp b/source/cl/source/program.cpp index c493b9813..d65e06ebc 100644 --- a/source/cl/source/program.cpp +++ b/source/cl/source/program.cpp @@ -542,13 +542,7 @@ cargo::expected, cl_int> _cl_program::create( context->getCompilerTarget(device)); } } -#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ < 9 - // GCC <9 requires this redundant move, this branch of the #if can be - // deleted once the minimum supported version of GCC is at least 9. - return std::move(program); -#else return program; -#endif } // Used by clCreateProgramWithIL, clCreateProgramWithILKHR. @@ -583,13 +577,7 @@ cargo::expected, cl_int> _cl_program::create( context->getCompilerTarget(device)); } } -#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ < 9 - // GCC <9 requires this redundant move, this branch of the #if can be - // deleted once the minimum supported version of GCC is at least 9. - return std::move(program); -#else return program; -#endif } // Used by clCreateProgramWithBinary. @@ -650,13 +638,7 @@ cargo::expected, cl_int> _cl_program::create( return cargo::make_unexpected(error); } program->type = cl::program_type::BINARY; -#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ < 9 - // GCC <9 requires this redundant move, this branch of the #if can be - // deleted once the minimum supported version of GCC is at least 9. - return std::move(program); -#else return program; -#endif } // Used by clCreateProgramWithBuiltInKernels. @@ -752,13 +734,7 @@ cargo::expected, cl_int> _cl_program::create( if (!program->finalize({device_list, num_devices})) { return cargo::make_unexpected(CL_INVALID_VALUE); } -#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ < 9 - // GCC <9 requires this redundant move, this branch of the #if can be - // deleted once the minimum supported version of GCC is at least 9. - return std::move(program); -#else return program; -#endif } // Used by clLinkProgram. @@ -787,13 +763,7 @@ cargo::expected, cl_int> _cl_program::create( if (!program->finalize(devices)) { return cargo::make_unexpected(CL_LINK_PROGRAM_FAILURE); } -#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ < 9 - // GCC <9 requires this redundant move, this branch of the #if can be - // deleted once the minimum supported version of GCC is at least 9. - return std::move(program); -#else return program; -#endif } cl_int _cl_program::compile( diff --git a/source/vk/source/pipeline_cache.cpp b/source/vk/source/pipeline_cache.cpp index 975324e01..3599da20c 100644 --- a/source/vk/source/pipeline_cache.cpp +++ b/source/vk/source/pipeline_cache.cpp @@ -44,13 +44,7 @@ cargo::error_or cached_shader::clone() const { } else { return clone_descriptor_bindings.error(); } -#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ < 9 - // GCC <9 requires this redundant move, this branch of the #if can be - // deleted once the minimum supported version of GCC is at least 9. - return std::move(clone); -#else return clone; -#endif } bool cached_shader::operator==(const cached_shader &other) const {