[llvm] 98ebb64 - [NFC][MIRPrinter] Use `std::move` to avoid copy (#157832)

via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 18 02:10:46 PDT 2025


Author: Abhishek Kaushik
Date: 2025-09-18T14:40:41+05:30
New Revision: 98ebb64a1639fa20e2cfa44bc796dfc28db1f691

URL: https://github.com/llvm/llvm-project/commit/98ebb64a1639fa20e2cfa44bc796dfc28db1f691
DIFF: https://github.com/llvm/llvm-project/commit/98ebb64a1639fa20e2cfa44bc796dfc28db1f691.diff

LOG: [NFC][MIRPrinter] Use `std::move` to avoid copy (#157832)

Added: 
    

Modified: 
    llvm/lib/CodeGen/MIRPrinter.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/MIRPrinter.cpp b/llvm/lib/CodeGen/MIRPrinter.cpp
index 7cc91925793a1..91a21a4adf4eb 100644
--- a/llvm/lib/CodeGen/MIRPrinter.cpp
+++ b/llvm/lib/CodeGen/MIRPrinter.cpp
@@ -627,7 +627,7 @@ convertSRPoints(ModuleSlotTracker &MST,
     StrOS << printMBBReference(*MBB);
     Entry.Point = StrOS.str().str();
     Str.clear();
-    YamlSRPoints.push_back(Entry);
+    YamlSRPoints.push_back(std::move(Entry));
   }
 }
 


        


More information about the llvm-commits mailing list