Remove unnecessary copying or replace it with moves in a bunch of places.
[oota-llvm.git] / lib / Target / NVPTX / NVPTXUtilities.cpp
index a9fd190b7ff041a9d1a689f886355d8c10a3f601..5caa8bd12cafc6dd23dea4f18d781ab04232c8d0 100644 (file)
@@ -90,11 +90,11 @@ static void cacheAnnotationFromMD(const Module *m, const GlobalValue *gv) {
     return;
 
   if ((*annotationCache).find(m) != (*annotationCache).end())
-    (*annotationCache)[m][gv] = tmp;
+    (*annotationCache)[m][gv] = std::move(tmp);
   else {
     global_val_annot_t tmp1;
-    tmp1[gv] = tmp;
-    (*annotationCache)[m] = tmp1;
+    tmp1[gv] = std::move(tmp);
+    (*annotationCache)[m] = std::move(tmp1);
   }
 }