summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/spir/files/0001-Avoid-pessimizing-std-move-3124.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-graphics/spir/files/0001-Avoid-pessimizing-std-move-3124.patch')
-rw-r--r--meta/recipes-graphics/spir/files/0001-Avoid-pessimizing-std-move-3124.patch50
1 files changed, 50 insertions, 0 deletions
diff --git a/meta/recipes-graphics/spir/files/0001-Avoid-pessimizing-std-move-3124.patch b/meta/recipes-graphics/spir/files/0001-Avoid-pessimizing-std-move-3124.patch
new file mode 100644
index 0000000000..9b48cdcd09
--- /dev/null
+++ b/meta/recipes-graphics/spir/files/0001-Avoid-pessimizing-std-move-3124.patch
@@ -0,0 +1,50 @@
1From 4fffcd275b50d08b54b0411679ead98970651bad Mon Sep 17 00:00:00 2001
2From: David Neto <dneto@google.com>
3Date: Fri, 27 Dec 2019 12:05:58 -0500
4Subject: [PATCH] Avoid pessimizing std::move (#3124)
5
6Should fix a warning
7
8Upstream-Status: Backport [https://github.com/KhronosGroup/SPIRV-Tools/commit/8aa423930db37e37086665efcc55944d577c06e5]
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11 test/opt/pass_fixture.h | 9 +++------
12 1 file changed, 3 insertions(+), 6 deletions(-)
13
14diff --git a/test/opt/pass_fixture.h b/test/opt/pass_fixture.h
15index 53fb206f..64c089d8 100644
16--- a/test/opt/pass_fixture.h
17+++ b/test/opt/pass_fixture.h
18@@ -60,8 +60,7 @@ class PassTest : public TestT {
19 // from pass Process() function.
20 std::tuple<std::vector<uint32_t>, Pass::Status> OptimizeToBinary(
21 Pass* pass, const std::string& original, bool skip_nop) {
22- context_ =
23- std::move(BuildModule(env_, consumer_, original, assemble_options_));
24+ context_ = BuildModule(env_, consumer_, original, assemble_options_);
25 EXPECT_NE(nullptr, context()) << "Assembling failed for shader:\n"
26 << original << std::endl;
27 if (!context()) {
28@@ -197,8 +196,7 @@ class PassTest : public TestT {
29 // messages.
30 template <typename PassT, typename... Args>
31 void SinglePassRunAndFail(const std::string& original, Args&&... args) {
32- context_ =
33- std::move(BuildModule(env_, consumer_, original, assemble_options_));
34+ context_ = BuildModule(env_, consumer_, original, assemble_options_);
35 EXPECT_NE(nullptr, context()) << "Assembling failed for shader:\n"
36 << original << std::endl;
37 std::ostringstream errs;
38@@ -235,8 +233,7 @@ class PassTest : public TestT {
39 void RunAndCheck(const std::string& original, const std::string& expected) {
40 assert(manager_->NumPasses());
41
42- context_ =
43- std::move(BuildModule(env_, nullptr, original, assemble_options_));
44+ context_ = BuildModule(env_, nullptr, original, assemble_options_);
45 ASSERT_NE(nullptr, context());
46
47 context()->set_preserve_bindings(OptimizerOptions()->preserve_bindings_);
48--
492.24.1
50