[llvm] [Instrumentation] Remove extraneous std::move (NFC) (PR #108764)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 15 08:54:39 PDT 2024


https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/108764

None

>From 93e2158792b4df118e69771cd9615f03d1467544 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Sun, 15 Sep 2024 08:18:44 -0700
Subject: [PATCH] [Instrumentation] Remove extraneous std::move (NFC)

---
 llvm/include/llvm/Transforms/Instrumentation/CFGMST.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/llvm/include/llvm/Transforms/Instrumentation/CFGMST.h b/llvm/include/llvm/Transforms/Instrumentation/CFGMST.h
index 682ae877f7ae39..35b3d615e3844a 100644
--- a/llvm/include/llvm/Transforms/Instrumentation/CFGMST.h
+++ b/llvm/include/llvm/Transforms/Instrumentation/CFGMST.h
@@ -280,13 +280,13 @@ template <class Edge, class BBInfo> class CFGMST {
     std::tie(Iter, Inserted) = BBInfos.insert(std::make_pair(Src, nullptr));
     if (Inserted) {
       // Newly inserted, update the real info.
-      Iter->second = std::move(std::make_unique<BBInfo>(Index));
+      Iter->second = std::make_unique<BBInfo>(Index);
       Index++;
     }
     std::tie(Iter, Inserted) = BBInfos.insert(std::make_pair(Dest, nullptr));
     if (Inserted)
       // Newly inserted, update the real info.
-      Iter->second = std::move(std::make_unique<BBInfo>(Index));
+      Iter->second = std::make_unique<BBInfo>(Index);
     AllEdges.emplace_back(new Edge(Src, Dest, W));
     return *AllEdges.back();
   }



More information about the llvm-commits mailing list