diff --git a/llpc/util/llpcShaderModuleHelper.cpp b/llpc/util/llpcShaderModuleHelper.cpp index 862d0f1fc7..bc59cd049e 100644 --- a/llpc/util/llpcShaderModuleHelper.cpp +++ b/llpc/util/llpcShaderModuleHelper.cpp @@ -540,7 +540,7 @@ Expected ShaderModuleHelper::getShaderCode(const ShaderModuleBuildIn if (trimDebugInfo) { auto sizeOrErr = trimSpirvDebugInfo(&shaderBinary, codeBuffer); if (Error err = sizeOrErr.takeError()) - return err; + return std::move(err); code.codeSize = *sizeOrErr; } else { assert(shaderBinary.codeSize <= codeBuffer.size() * sizeof(codeBuffer.front()));