[PATCH] D75684: [mlir][LLVM] Remove pessimizing std::move.

Stephan Herhut via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 5 08:13:20 PST 2020


herhut created this revision.
Herald added a reviewer: jdoerfert.
Herald added subscribers: llvm-commits, Joonsoo, liufengdb, lucyrfox, mgester, arpith-jacob, nicolasvasilache, antiagainst, shauheen, burmako, jpienaar, rriddle, mehdi_amini.
Herald added a project: LLVM.
herhut added a reviewer: ftynse.
herhut added a comment.

This is to make this build with less permissive warning/error flags, as well :)


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D75684

Files:
  mlir/lib/Target/LLVMIR/ModuleTranslation.cpp


Index: mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
===================================================================
--- mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
+++ mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
@@ -380,8 +380,7 @@
 
   if (opInst.getDialect() == ompDialect) {
     if (!ompBuilder) {
-      ompBuilder =
-          std::move(std::make_unique<llvm::OpenMPIRBuilder>(*llvmModule));
+      ompBuilder = std::make_unique<llvm::OpenMPIRBuilder>(*llvmModule);
       ompBuilder->initialize();
     }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75684.248482.patch
Type: text/x-patch
Size: 520 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200305/c7e7c624/attachment.bin>


More information about the llvm-commits mailing list