[llvm] r240355 - Code cleanup: Remove std::move() around xvalue (NFC)

Logan Chien tzuhsiang.chien at gmail.com
Mon Jun 22 16:16:02 PDT 2015


Author: logan
Date: Mon Jun 22 18:16:02 2015
New Revision: 240355

URL: http://llvm.org/viewvc/llvm-project?rev=240355&view=rev
Log:
Code cleanup: Remove std::move() around xvalue (NFC)

Remove std::move() around xvalue so that copy elision is eligible.
In case that copy elision is not appliable, the c++ standard also
guarantees the move semantics on xvalue.  Thus, it is not necessary
to wrap Args with std::move.

This also silence a warning since r240345.


Modified:
    llvm/trunk/lib/Option/OptTable.cpp

Modified: llvm/trunk/lib/Option/OptTable.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Option/OptTable.cpp?rev=240355&r1=240354&r2=240355&view=diff
==============================================================================
--- llvm/trunk/lib/Option/OptTable.cpp (original)
+++ llvm/trunk/lib/Option/OptTable.cpp Mon Jun 22 18:16:02 2015
@@ -287,7 +287,7 @@ InputArgList OptTable::ParseArgs(ArrayRe
     Args.append(A);
   }
 
-  return std::move(Args);
+  return Args;
 }
 
 static std::string getOptionHelpName(const OptTable &Opts, OptSpecifier Id) {





More information about the llvm-commits mailing list