<div dir="ltr">Nice :)<br><br>Do we have any way to integrate these checks into the developer workflow so we can avoid checking in the same mistakes tomorrow?</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 27, 2016 at 7:27 AM, Benjamin Kramer via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: d0k<br>
Date: Fri May 27 09:27:24 2016<br>
New Revision: 270997<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=270997&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=270997&view=rev</a><br>
Log:<br>
Apply clang-tidy's misc-move-constructor-init throughout LLVM.<br>
<br>
No functionality change intended, maybe a tiny performance improvement.<br>
<br>
Modified:<br>
llvm/trunk/include/llvm/ADT/SetVector.h<br>
llvm/trunk/include/llvm/CodeGen/GCMetadata.h<br>
llvm/trunk/include/llvm/CodeGen/PBQP/Graph.h<br>
llvm/trunk/include/llvm/DebugInfo/CodeView/TypeRecord.h<br>
llvm/trunk/include/llvm/DebugInfo/Symbolize/Symbolize.h<br>
llvm/trunk/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h<br>
llvm/trunk/include/llvm/ExecutionEngine/RuntimeDyld.h<br>
llvm/trunk/include/llvm/IR/ProfileSummary.h<br>
llvm/trunk/include/llvm/LineEditor/LineEditor.h<br>
llvm/trunk/include/llvm/MC/MCParser/MCAsmLexer.h<br>
llvm/trunk/include/llvm/Object/SymbolicFile.h<br>
llvm/trunk/include/llvm/ProfileData/ProfileCommon.h<br>
llvm/trunk/include/llvm/Transforms/IPO/FunctionImport.h<br>
llvm/trunk/lib/Analysis/TargetTransformInfo.cpp<br>
llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp<br>
llvm/trunk/lib/CodeGen/IfConversion.cpp<br>
llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp<br>
llvm/trunk/lib/CodeGen/MachineInstrBundle.cpp<br>
llvm/trunk/lib/CodeGen/SelectionDAG/SDNodeDbgValue.h<br>
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h<br>
llvm/trunk/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp<br>
llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp<br>
llvm/trunk/lib/Linker/IRMover.cpp<br>
llvm/trunk/lib/MC/MCDisassembler/Disassembler.h<br>
llvm/trunk/lib/Target/ARM/Thumb2SizeReduction.cpp<br>
llvm/trunk/lib/Target/NVPTX/NVPTXMCExpr.h<br>
llvm/trunk/lib/Transforms/Instrumentation/PGOInstrumentation.cpp<br>
llvm/trunk/lib/Transforms/Scalar/LICM.cpp<br>
llvm/trunk/lib/Transforms/Scalar/LoopUnrollPass.cpp<br>
llvm/trunk/lib/Transforms/Scalar/SimplifyCFGPass.cpp<br>
llvm/trunk/tools/bugpoint/ToolRunner.cpp<br>
llvm/trunk/tools/gold/gold-plugin.cpp<br>
llvm/trunk/tools/llvm-link/llvm-link.cpp<br>
llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp<br>
llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp<br>
llvm/trunk/utils/TableGen/CodeGenInstruction.h<br>
llvm/trunk/utils/TableGen/FastISelEmitter.cpp<br>
llvm/trunk/utils/TableGen/FixedLenDecoderEmitter.cpp<br>
<br>
Modified: llvm/trunk/include/llvm/ADT/SetVector.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/SetVector.h?rev=270997&r1=270996&r2=270997&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/SetVector.h?rev=270997&r1=270996&r2=270997&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/ADT/SetVector.h (original)<br>
+++ llvm/trunk/include/llvm/ADT/SetVector.h Fri May 27 09:27:24 2016<br>
@@ -24,6 +24,7 @@<br>
#include "llvm/ADT/SmallSet.h"<br>
#include <algorithm><br>
#include <cassert><br>
+#include <utility><br>
#include <vector><br>
<br>
namespace llvm {<br>
@@ -262,7 +263,8 @@ private:<br>
set_type &set_;<br>
<br>
public:<br>
- TestAndEraseFromSet(UnaryPredicate P, set_type &set_) : P(P), set_(set_) {}<br>
+ TestAndEraseFromSet(UnaryPredicate P, set_type &set_)<br>
+ : P(std::move(P)), set_(set_) {}<br>
<br>
template <typename ArgumentT><br>
bool operator()(const ArgumentT &Arg) {<br>
<br>
Modified: llvm/trunk/include/llvm/CodeGen/GCMetadata.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/GCMetadata.h?rev=270997&r1=270996&r2=270997&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/GCMetadata.h?rev=270997&r1=270996&r2=270997&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/CodeGen/GCMetadata.h (original)<br>
+++ llvm/trunk/include/llvm/CodeGen/GCMetadata.h Fri May 27 09:27:24 2016<br>
@@ -40,6 +40,7 @@<br>
#include "llvm/IR/DebugLoc.h"<br>
#include "llvm/Pass.h"<br>
#include <memory><br>
+#include <utility><br>
<br>
namespace llvm {<br>
class AsmPrinter;<br>
@@ -54,7 +55,7 @@ struct GCPoint {<br>
DebugLoc Loc;<br>
<br>
GCPoint(GC::PointKind K, MCSymbol *L, DebugLoc DL)<br>
- : Kind(K), Label(L), Loc(DL) {}<br>
+ : Kind(K), Label(L), Loc(std::move(DL)) {}<br>
};<br>
<br>
/// GCRoot - Metadata for a pointer to an object managed by the garbage<br>
<br>
Modified: llvm/trunk/include/llvm/CodeGen/PBQP/Graph.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/PBQP/Graph.h?rev=270997&r1=270996&r2=270997&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/PBQP/Graph.h?rev=270997&r1=270996&r2=270997&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/CodeGen/PBQP/Graph.h (original)<br>
+++ llvm/trunk/include/llvm/CodeGen/PBQP/Graph.h Fri May 27 09:27:24 2016<br>
@@ -16,6 +16,7 @@<br>
#define LLVM_CODEGEN_PBQP_GRAPH_H<br>
<br>
#include "llvm/Support/Debug.h"<br>
+#include <utility><br>
#include <vector><br>
<br>
namespace llvm {<br>
@@ -67,7 +68,7 @@ namespace PBQP {<br>
return std::numeric_limits<AdjEdgeIdx>::max();<br>
}<br>
<br>
- NodeEntry(VectorPtr Costs) : Costs(Costs) {}<br>
+ NodeEntry(VectorPtr Costs) : Costs(std::move(Costs)) {}<br>
<br>
AdjEdgeIdx addAdjEdgeId(EdgeId EId) {<br>
AdjEdgeIdx Idx = AdjEdgeIds.size();<br>
@@ -98,7 +99,7 @@ namespace PBQP {<br>
class EdgeEntry {<br>
public:<br>
EdgeEntry(NodeId N1Id, NodeId N2Id, MatrixPtr Costs)<br>
- : Costs(Costs) {<br>
+ : Costs(std::move(Costs)) {<br>
NIds[0] = N1Id;<br>
NIds[1] = N2Id;<br>
ThisEdgeAdjIdxs[0] = NodeEntry::getInvalidAdjEdgeIdx();<br>
@@ -343,7 +344,8 @@ namespace PBQP {<br>
Graph() : Solver(nullptr) {}<br>
<br>
/// @brief Construct an empty PBQP graph with the given graph metadata.<br>
- Graph(GraphMetadata Metadata) : Metadata(Metadata), Solver(nullptr) {}<br>
+ Graph(GraphMetadata Metadata)<br>
+ : Metadata(std::move(Metadata)), Solver(nullptr) {}<br>
<br>
/// @brief Get a reference to the graph metadata.<br>
GraphMetadata& getMetadata() { return Metadata; }<br>
<br>
Modified: llvm/trunk/include/llvm/DebugInfo/CodeView/TypeRecord.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/CodeView/TypeRecord.h?rev=270997&r1=270996&r2=270997&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/CodeView/TypeRecord.h?rev=270997&r1=270996&r2=270997&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/DebugInfo/CodeView/TypeRecord.h (original)<br>
+++ llvm/trunk/include/llvm/DebugInfo/CodeView/TypeRecord.h Fri May 27 09:27:24 2016<br>
@@ -18,6 +18,7 @@<br>
#include "llvm/DebugInfo/CodeView/TypeIndex.h"<br>
#include "llvm/Support/ErrorOr.h"<br>
#include <cinttypes><br>
+#include <utility><br>
<br>
namespace llvm {<br>
namespace codeview {<br>
@@ -746,7 +747,7 @@ public:<br>
explicit VFTableShapeRecord(ArrayRef<VFTableSlotKind> Slots)<br>
: TypeRecord(TypeRecordKind::VFTableShape), SlotsRef(Slots) {}<br>
explicit VFTableShapeRecord(std::vector<VFTableSlotKind> Slots)<br>
- : TypeRecord(TypeRecordKind::VFTableShape), Slots(Slots) {}<br>
+ : TypeRecord(TypeRecordKind::VFTableShape), Slots(std::move(Slots)) {}<br>
<br>
/// Rewrite member type indices with IndexMap. Returns false if a type index<br>
/// is not in the map.<br>
@@ -1256,8 +1257,8 @@ private:<br>
class EnumeratorRecord : public TypeRecord {<br>
public:<br>
EnumeratorRecord(MemberAccess Access, APSInt Value, StringRef Name)<br>
- : TypeRecord(TypeRecordKind::Enumerator), Access(Access), Value(Value),<br>
- Name(Name) {}<br>
+ : TypeRecord(TypeRecordKind::Enumerator), Access(Access),<br>
+ Value(std::move(Value)), Name(Name) {}<br>
<br>
/// Rewrite member type indices with IndexMap. Returns false if a type index<br>
/// is not in the map.<br>
<br>
Modified: llvm/trunk/include/llvm/DebugInfo/Symbolize/Symbolize.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/Symbolize/Symbolize.h?rev=270997&r1=270996&r2=270997&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/Symbolize/Symbolize.h?rev=270997&r1=270996&r2=270997&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/DebugInfo/Symbolize/Symbolize.h (original)<br>
+++ llvm/trunk/include/llvm/DebugInfo/Symbolize/Symbolize.h Fri May 27 09:27:24 2016<br>
@@ -19,6 +19,7 @@<br>
#include <map><br>
#include <memory><br>
#include <string><br>
+#include <utility><br>
<br>
namespace llvm {<br>
namespace symbolize {<br>
@@ -40,7 +41,7 @@ public:<br>
bool RelativeAddresses = false, std::string DefaultArch = "")<br>
: PrintFunctions(PrintFunctions), UseSymbolTable(UseSymbolTable),<br>
Demangle(Demangle), RelativeAddresses(RelativeAddresses),<br>
- DefaultArch(DefaultArch) {}<br>
+ DefaultArch(std::move(DefaultArch)) {}<br>
};<br>
<br>
LLVMSymbolizer(const Options &Opts = Options()) : Opts(Opts) {}<br>
<br>
Modified: llvm/trunk/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h?rev=270997&r1=270996&r2=270997&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h?rev=270997&r1=270996&r2=270997&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h (original)<br>
+++ llvm/trunk/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h Fri May 27 09:27:24 2016<br>
@@ -19,12 +19,12 @@<br>
#include "LambdaResolver.h"<br>
#include "LogicalDylib.h"<br>
#include "llvm/ADT/STLExtras.h"<br>
+#include "llvm/Support/Debug.h"<br>
#include "llvm/Transforms/Utils/Cloning.h"<br>
#include <list><br>
#include <memory><br>
#include <set><br>
-<br>
-#include "llvm/Support/Debug.h"<br>
+#include <utility><br>
<br>
namespace llvm {<br>
namespace orc {<br>
@@ -173,7 +173,7 @@ public:<br>
CompileCallbackMgrT &CallbackMgr,<br>
IndirectStubsManagerBuilderT CreateIndirectStubsManager,<br>
bool CloneStubsIntoPartitions = true)<br>
- : BaseLayer(BaseLayer), Partition(Partition),<br>
+ : BaseLayer(BaseLayer), Partition(std::move(Partition)),<br>
CompileCallbackMgr(CallbackMgr),<br>
CreateIndirectStubsManager(std::move(CreateIndirectStubsManager)),<br>
CloneStubsIntoPartitions(CloneStubsIntoPartitions) {}<br>
<br>
Modified: llvm/trunk/include/llvm/ExecutionEngine/RuntimeDyld.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/RuntimeDyld.h?rev=270997&r1=270996&r2=270997&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/RuntimeDyld.h?rev=270997&r1=270996&r2=270997&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/ExecutionEngine/RuntimeDyld.h (original)<br>
+++ llvm/trunk/include/llvm/ExecutionEngine/RuntimeDyld.h Fri May 27 09:27:24 2016<br>
@@ -21,6 +21,7 @@<br>
#include "llvm/Support/Memory.h"<br>
#include <map><br>
#include <memory><br>
+#include <utility><br>
<br>
namespace llvm {<br>
<br>
@@ -78,7 +79,7 @@ public:<br>
typedef std::map<object::SectionRef, unsigned> ObjSectionToIDMap;<br>
<br>
LoadedObjectInfo(RuntimeDyldImpl &RTDyld, ObjSectionToIDMap ObjSecToIDMap)<br>
- : RTDyld(RTDyld), ObjSecToIDMap(ObjSecToIDMap) { }<br>
+ : RTDyld(RTDyld), ObjSecToIDMap(std::move(ObjSecToIDMap)) {}<br>
<br>
virtual object::OwningBinary<object::ObjectFile><br>
getObjectForDebug(const object::ObjectFile &Obj) const = 0;<br>
<br>
Modified: llvm/trunk/include/llvm/IR/ProfileSummary.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/ProfileSummary.h?rev=270997&r1=270996&r2=270997&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/ProfileSummary.h?rev=270997&r1=270996&r2=270997&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/IR/ProfileSummary.h (original)<br>
+++ llvm/trunk/include/llvm/IR/ProfileSummary.h Fri May 27 09:27:24 2016<br>
@@ -15,6 +15,7 @@<br>
#define LLVM_SUPPORT_PROFILE_SUMMARY_H<br>
<br>
#include <cstdint><br>
+#include <utility><br>
#include <vector><br>
<br>
#include "llvm/Support/Casting.h"<br>
@@ -62,10 +63,10 @@ public:<br>
uint64_t TotalCount, uint64_t MaxCount,<br>
uint64_t MaxInternalCount, uint64_t MaxFunctionCount,<br>
uint32_t NumCounts, uint32_t NumFunctions)<br>
- : PSK(K), DetailedSummary(DetailedSummary), TotalCount(TotalCount),<br>
- MaxCount(MaxCount), MaxInternalCount(MaxInternalCount),<br>
- MaxFunctionCount(MaxFunctionCount), NumCounts(NumCounts),<br>
- NumFunctions(NumFunctions) {}<br>
+ : PSK(K), DetailedSummary(std::move(DetailedSummary)),<br>
+ TotalCount(TotalCount), MaxCount(MaxCount),<br>
+ MaxInternalCount(MaxInternalCount), MaxFunctionCount(MaxFunctionCount),<br>
+ NumCounts(NumCounts), NumFunctions(NumFunctions) {}<br>
Kind getKind() const { return PSK; }<br>
/// \brief Return summary information as metadata.<br>
Metadata *getMD(LLVMContext &Context);<br>
<br>
Modified: llvm/trunk/include/llvm/LineEditor/LineEditor.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/LineEditor/LineEditor.h?rev=270997&r1=270996&r2=270997&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/LineEditor/LineEditor.h?rev=270997&r1=270996&r2=270997&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/LineEditor/LineEditor.h (original)<br>
+++ llvm/trunk/include/llvm/LineEditor/LineEditor.h Fri May 27 09:27:24 2016<br>
@@ -15,6 +15,7 @@<br>
#include <cstdio><br>
#include <memory><br>
#include <string><br>
+#include <utility><br>
#include <vector><br>
<br>
namespace llvm {<br>
@@ -137,7 +138,7 @@ private:<br>
<br>
template <typename T><br>
struct ListCompleterModel : ListCompleterConcept {<br>
- ListCompleterModel(T Value) : Value(Value) {}<br>
+ ListCompleterModel(T Value) : Value(std::move(Value)) {}<br>
std::vector<Completion> getCompletions(StringRef Buffer,<br>
size_t Pos) const override {<br>
return Value(Buffer, Pos);<br>
<br>
Modified: llvm/trunk/include/llvm/MC/MCParser/MCAsmLexer.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCParser/MCAsmLexer.h?rev=270997&r1=270996&r2=270997&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCParser/MCAsmLexer.h?rev=270997&r1=270996&r2=270997&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/MC/MCParser/MCAsmLexer.h (original)<br>
+++ llvm/trunk/include/llvm/MC/MCParser/MCAsmLexer.h Fri May 27 09:27:24 2016<br>
@@ -17,6 +17,7 @@<br>
#include "llvm/Support/Compiler.h"<br>
#include "llvm/Support/DataTypes.h"<br>
#include "llvm/Support/SMLoc.h"<br>
+#include <utility><br>
<br>
namespace llvm {<br>
<br>
@@ -66,7 +67,7 @@ private:<br>
public:<br>
AsmToken() {}<br>
AsmToken(TokenKind Kind, StringRef Str, APInt IntVal)<br>
- : Kind(Kind), Str(Str), IntVal(IntVal) {}<br>
+ : Kind(Kind), Str(Str), IntVal(std::move(IntVal)) {}<br>
AsmToken(TokenKind Kind, StringRef Str, int64_t IntVal = 0)<br>
: Kind(Kind), Str(Str), IntVal(64, IntVal, true) {}<br>
<br>
<br>
Modified: llvm/trunk/include/llvm/Object/SymbolicFile.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Object/SymbolicFile.h?rev=270997&r1=270996&r2=270997&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Object/SymbolicFile.h?rev=270997&r1=270996&r2=270997&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/Object/SymbolicFile.h (original)<br>
+++ llvm/trunk/include/llvm/Object/SymbolicFile.h Fri May 27 09:27:24 2016<br>
@@ -16,6 +16,7 @@<br>
<br>
#include "llvm/Object/Binary.h"<br>
#include "llvm/Support/Format.h"<br>
+#include <utility><br>
<br>
namespace llvm {<br>
namespace object {<br>
@@ -58,7 +59,7 @@ class content_iterator<br>
content_type Current;<br>
<br>
public:<br>
- content_iterator(content_type symb) : Current(symb) {}<br>
+ content_iterator(content_type symb) : Current(std::move(symb)) {}<br>
<br>
const content_type *operator->() const { return &Current; }<br>
<br>
<br>
Modified: llvm/trunk/include/llvm/ProfileData/ProfileCommon.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ProfileData/ProfileCommon.h?rev=270997&r1=270996&r2=270997&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ProfileData/ProfileCommon.h?rev=270997&r1=270996&r2=270997&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/ProfileData/ProfileCommon.h (original)<br>
+++ llvm/trunk/include/llvm/ProfileData/ProfileCommon.h Fri May 27 09:27:24 2016<br>
@@ -18,6 +18,7 @@<br>
#include <cstdint><br>
#include <functional><br>
#include <map><br>
+#include <utility><br>
#include <vector><br>
<br>
#include "llvm/IR/ProfileSummary.h"<br>
@@ -52,7 +53,7 @@ private:<br>
protected:<br>
SummaryEntryVector DetailedSummary;<br>
ProfileSummaryBuilder(std::vector<uint32_t> Cutoffs)<br>
- : DetailedSummaryCutoffs(Cutoffs), TotalCount(0), MaxCount(0),<br>
+ : DetailedSummaryCutoffs(std::move(Cutoffs)), TotalCount(0), MaxCount(0),<br>
MaxFunctionCount(0), NumCounts(0), NumFunctions(0) {}<br>
inline void addCount(uint64_t Count);<br>
~ProfileSummaryBuilder() = default;<br>
<br>
Modified: llvm/trunk/include/llvm/Transforms/IPO/FunctionImport.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/IPO/FunctionImport.h?rev=270997&r1=270996&r2=270997&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/IPO/FunctionImport.h?rev=270997&r1=270996&r2=270997&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/Transforms/IPO/FunctionImport.h (original)<br>
+++ llvm/trunk/include/llvm/Transforms/IPO/FunctionImport.h Fri May 27 09:27:24 2016<br>
@@ -17,6 +17,7 @@<br>
#include <functional><br>
#include <map><br>
#include <unordered_set><br>
+#include <utility><br>
<br>
namespace llvm {<br>
class LLVMContext;<br>
@@ -45,7 +46,7 @@ public:<br>
FunctionImporter(<br>
const ModuleSummaryIndex &Index,<br>
std::function<std::unique_ptr<Module>(StringRef Identifier)> ModuleLoader)<br>
- : Index(Index), ModuleLoader(ModuleLoader) {}<br>
+ : Index(Index), ModuleLoader(std::move(ModuleLoader)) {}<br>
<br>
/// Import functions in Module \p M based on the supplied import list.<br>
/// \p ForceImportReferencedDiscardableSymbols will set the ModuleLinker in<br>
<br>
Modified: llvm/trunk/lib/Analysis/TargetTransformInfo.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/TargetTransformInfo.cpp?rev=270997&r1=270996&r2=270997&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/TargetTransformInfo.cpp?rev=270997&r1=270996&r2=270997&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Analysis/TargetTransformInfo.cpp (original)<br>
+++ llvm/trunk/lib/Analysis/TargetTransformInfo.cpp Fri May 27 09:27:24 2016<br>
@@ -17,6 +17,7 @@<br>
#include "llvm/IR/Module.h"<br>
#include "llvm/IR/Operator.h"<br>
#include "llvm/Support/ErrorHandling.h"<br>
+#include <utility><br>
<br>
using namespace llvm;<br>
<br>
@@ -397,7 +398,7 @@ TargetIRAnalysis::TargetIRAnalysis() : T<br>
<br>
TargetIRAnalysis::TargetIRAnalysis(<br>
std::function<Result(const Function &)> TTICallback)<br>
- : TTICallback(TTICallback) {}<br>
+ : TTICallback(std::move(TTICallback)) {}<br>
<br>
TargetIRAnalysis::Result TargetIRAnalysis::run(const Function &F) {<br>
return TTICallback(F);<br>
<br>
Modified: llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp?rev=270997&r1=270996&r2=270997&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp?rev=270997&r1=270996&r2=270997&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp (original)<br>
+++ llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp Fri May 27 09:27:24 2016<br>
@@ -37,6 +37,7 @@<br>
#include "llvm/Support/MemoryBuffer.h"<br>
#include "llvm/Support/raw_ostream.h"<br>
#include <deque><br>
+#include <utility><br>
<br>
using namespace llvm;<br>
<br>
@@ -5713,13 +5714,13 @@ std::error_code ModuleSummaryIndexBitcod<br>
ModuleSummaryIndexBitcodeReader::ModuleSummaryIndexBitcodeReader(<br>
MemoryBuffer *Buffer, DiagnosticHandlerFunction DiagnosticHandler,<br>
bool CheckGlobalValSummaryPresenceOnly)<br>
- : DiagnosticHandler(DiagnosticHandler), Buffer(Buffer),<br>
+ : DiagnosticHandler(std::move(DiagnosticHandler)), Buffer(Buffer),<br>
CheckGlobalValSummaryPresenceOnly(CheckGlobalValSummaryPresenceOnly) {}<br>
<br>
ModuleSummaryIndexBitcodeReader::ModuleSummaryIndexBitcodeReader(<br>
DiagnosticHandlerFunction DiagnosticHandler,<br>
bool CheckGlobalValSummaryPresenceOnly)<br>
- : DiagnosticHandler(DiagnosticHandler), Buffer(nullptr),<br>
+ : DiagnosticHandler(std::move(DiagnosticHandler)), Buffer(nullptr),<br>
CheckGlobalValSummaryPresenceOnly(CheckGlobalValSummaryPresenceOnly) {}<br>
<br>
void ModuleSummaryIndexBitcodeReader::freeState() { Buffer = nullptr; }<br>
<br>
Modified: llvm/trunk/lib/CodeGen/IfConversion.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/IfConversion.cpp?rev=270997&r1=270996&r2=270997&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/IfConversion.cpp?rev=270997&r1=270996&r2=270997&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/CodeGen/IfConversion.cpp (original)<br>
+++ llvm/trunk/lib/CodeGen/IfConversion.cpp Fri May 27 09:27:24 2016<br>
@@ -34,6 +34,7 @@<br>
#include "llvm/Target/TargetRegisterInfo.h"<br>
#include "llvm/Target/TargetSubtargetInfo.h"<br>
#include <algorithm><br>
+#include <utility><br>
<br>
using namespace llvm;<br>
<br>
@@ -177,7 +178,7 @@ namespace {<br>
public:<br>
static char ID;<br>
IfConverter(std::function<bool(const Function &)> Ftor = nullptr)<br>
- : MachineFunctionPass(ID), FnNum(-1), PredicateFtor(Ftor) {<br>
+ : MachineFunctionPass(ID), FnNum(-1), PredicateFtor(std::move(Ftor)) {<br>
initializeIfConverterPass(*PassRegistry::getPassRegistry());<br>
}<br>
<br>
<br>
Modified: llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp?rev=270997&r1=270996&r2=270997&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp?rev=270997&r1=270996&r2=270997&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp (original)<br>
+++ llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp Fri May 27 09:27:24 2016<br>
@@ -42,6 +42,7 @@<br>
#include "llvm/Target/TargetRegisterInfo.h"<br>
#include "llvm/Target/TargetSubtargetInfo.h"<br>
#include <memory><br>
+#include <utility><br>
<br>
using namespace llvm;<br>
<br>
@@ -84,7 +85,7 @@ class UserValueScopes {<br>
SmallPtrSet<const MachineBasicBlock *, 4> LBlocks;<br>
<br>
public:<br>
- UserValueScopes(DebugLoc D, LexicalScopes &L) : DL(D), LS(L) {}<br>
+ UserValueScopes(DebugLoc D, LexicalScopes &L) : DL(std::move(D)), LS(L) {}<br>
<br>
/// dominates - Return true if current scope dominates at least one machine<br>
/// instruction in a given machine basic block.<br>
@@ -141,8 +142,8 @@ public:<br>
/// UserValue - Create a new UserValue.<br>
UserValue(const MDNode *var, const MDNode *expr, unsigned o, bool i,<br>
DebugLoc L, LocMap::Allocator &alloc)<br>
- : Variable(var), Expression(expr), offset(o), IsIndirect(i), dl(L),<br>
- leader(this), next(nullptr), locInts(alloc) {}<br>
+ : Variable(var), Expression(expr), offset(o), IsIndirect(i),<br>
+ dl(std::move(L)), leader(this), next(nullptr), locInts(alloc) {}<br>
<br>
/// getLeader - Get the leader of this value's equivalence class.<br>
UserValue *getLeader() {<br>
<br>
Modified: llvm/trunk/lib/CodeGen/MachineInstrBundle.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineInstrBundle.cpp?rev=270997&r1=270996&r2=270997&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineInstrBundle.cpp?rev=270997&r1=270996&r2=270997&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/CodeGen/MachineInstrBundle.cpp (original)<br>
+++ llvm/trunk/lib/CodeGen/MachineInstrBundle.cpp Fri May 27 09:27:24 2016<br>
@@ -17,6 +17,7 @@<br>
#include "llvm/Target/TargetMachine.h"<br>
#include "llvm/Target/TargetRegisterInfo.h"<br>
#include "llvm/Target/TargetSubtargetInfo.h"<br>
+#include <utility><br>
using namespace llvm;<br>
<br>
namespace {<br>
@@ -24,7 +25,7 @@ namespace {<br>
public:<br>
static char ID; // Pass identification<br>
UnpackMachineBundles(std::function<bool(const Function &)> Ftor = nullptr)<br>
- : MachineFunctionPass(ID), PredicateFtor(Ftor) {<br>
+ : MachineFunctionPass(ID), PredicateFtor(std::move(Ftor)) {<br>
initializeUnpackMachineBundlesPass(*PassRegistry::getPassRegistry());<br>
}<br>
<br>
<br>
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SDNodeDbgValue.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SDNodeDbgValue.h?rev=270997&r1=270996&r2=270997&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SDNodeDbgValue.h?rev=270997&r1=270996&r2=270997&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/CodeGen/SelectionDAG/SDNodeDbgValue.h (original)<br>
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SDNodeDbgValue.h Fri May 27 09:27:24 2016<br>
@@ -16,6 +16,7 @@<br>
<br>
#include "llvm/IR/DebugLoc.h"<br>
#include "llvm/Support/DataTypes.h"<br>
+#include <utility><br>
<br>
namespace llvm {<br>
<br>
@@ -55,7 +56,8 @@ public:<br>
// Constructor for non-constants.<br>
SDDbgValue(MDNode *Var, MDNode *Expr, SDNode *N, unsigned R, bool indir,<br>
uint64_t off, DebugLoc dl, unsigned O)<br>
- : Var(Var), Expr(Expr), Offset(off), DL(dl), Order(O), IsIndirect(indir) {<br>
+ : Var(Var), Expr(Expr), Offset(off), DL(std::move(dl)), Order(O),<br>
+ IsIndirect(indir) {<br>
kind = SDNODE;<br>
u.s.Node = N;<br>
u.s.ResNo = R;<br>
@@ -64,7 +66,8 @@ public:<br>
// Constructor for constants.<br>
SDDbgValue(MDNode *Var, MDNode *Expr, const Value *C, uint64_t off,<br>
DebugLoc dl, unsigned O)<br>
- : Var(Var), Expr(Expr), Offset(off), DL(dl), Order(O), IsIndirect(false) {<br>
+ : Var(Var), Expr(Expr), Offset(off), DL(std::move(dl)), Order(O),<br>
+ IsIndirect(false) {<br>
kind = CONST;<br>
u.Const = C;<br>
}<br>
@@ -72,7 +75,8 @@ public:<br>
// Constructor for frame indices.<br>
SDDbgValue(MDNode *Var, MDNode *Expr, unsigned FI, uint64_t off, DebugLoc dl,<br>
unsigned O)<br>
- : Var(Var), Expr(Expr), Offset(off), DL(dl), Order(O), IsIndirect(false) {<br>
+ : Var(Var), Expr(Expr), Offset(off), DL(std::move(dl)), Order(O),<br>
+ IsIndirect(false) {<br>
kind = FRAMEIX;<br>
u.FrameIx = FI;<br>
}<br>
<br>
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h?rev=270997&r1=270996&r2=270997&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h?rev=270997&r1=270996&r2=270997&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h (original)<br>
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h Fri May 27 09:27:24 2016<br>
@@ -22,10 +22,11 @@<br>
#include "llvm/CodeGen/SelectionDAG.h"<br>
#include "llvm/CodeGen/SelectionDAGNodes.h"<br>
#include "llvm/IR/CallSite.h"<br>
-#include "llvm/IR/Statepoint.h"<br>
#include "llvm/IR/Constants.h"<br>
+#include "llvm/IR/Statepoint.h"<br>
#include "llvm/Support/ErrorHandling.h"<br>
#include "llvm/Target/TargetLowering.h"<br>
+#include <utility><br>
#include <vector><br>
<br>
namespace llvm {<br>
@@ -101,8 +102,8 @@ class SelectionDAGBuilder {<br>
unsigned SDNodeOrder;<br>
public:<br>
DanglingDebugInfo() : DI(nullptr), dl(DebugLoc()), SDNodeOrder(0) { }<br>
- DanglingDebugInfo(const DbgValueInst *di, DebugLoc DL, unsigned SDNO) :<br>
- DI(di), dl(DL), SDNodeOrder(SDNO) { }<br>
+ DanglingDebugInfo(const DbgValueInst *di, DebugLoc DL, unsigned SDNO)<br>
+ : DI(di), dl(std::move(DL)), SDNodeOrder(SDNO) {}<br>
const DbgValueInst* getDI() { return DI; }<br>
DebugLoc getdl() { return dl; }<br>
unsigned getSDNodeOrder() { return SDNodeOrder; }<br>
@@ -260,8 +261,9 @@ private:<br>
};<br>
struct JumpTableHeader {<br>
JumpTableHeader(APInt F, APInt L, const Value *SV, MachineBasicBlock *H,<br>
- bool E = false):<br>
- First(F), Last(L), SValue(SV), HeaderBB(H), Emitted(E) {}<br>
+ bool E = false)<br>
+ : First(std::move(F)), Last(std::move(L)), SValue(SV), HeaderBB(H),<br>
+ Emitted(E) {}<br>
APInt First;<br>
APInt Last;<br>
const Value *SValue;<br>
@@ -286,9 +288,9 @@ private:<br>
BitTestBlock(APInt F, APInt R, const Value *SV, unsigned Rg, MVT RgVT,<br>
bool E, bool CR, MachineBasicBlock *P, MachineBasicBlock *D,<br>
BitTestInfo C, BranchProbability Pr)<br>
- : First(F), Range(R), SValue(SV), Reg(Rg), RegVT(RgVT), Emitted(E),<br>
- ContiguousRange(CR), Parent(P), Default(D), Cases(std::move(C)),<br>
- Prob(Pr) {}<br>
+ : First(std::move(F)), Range(std::move(R)), SValue(SV), Reg(Rg),<br>
+ RegVT(RgVT), Emitted(E), ContiguousRange(CR), Parent(P), Default(D),<br>
+ Cases(std::move(C)), Prob(Pr) {}<br>
APInt First;<br>
APInt Range;<br>
const Value *SValue;<br>
<br>
Modified: llvm/trunk/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp?rev=270997&r1=270996&r2=270997&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp?rev=270997&r1=270996&r2=270997&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp (original)<br>
+++ llvm/trunk/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp Fri May 27 09:27:24 2016<br>
@@ -20,6 +20,7 @@<br>
#include "llvm/Support/Format.h"<br>
#include "llvm/Support/raw_ostream.h"<br>
#include <string><br>
+#include <utility><br>
#include <vector><br>
<br>
using namespace llvm;<br>
@@ -205,15 +206,14 @@ public:<br>
SmallString<8> AugmentationData, uint32_t FDEPointerEncoding,<br>
uint32_t LSDAPointerEncoding)<br>
: FrameEntry(FK_CIE, Offset, Length), Version(Version),<br>
- Augmentation(std::move(Augmentation)),<br>
- AddressSize(AddressSize),<br>
+ Augmentation(std::move(Augmentation)), AddressSize(AddressSize),<br>
SegmentDescriptorSize(SegmentDescriptorSize),<br>
CodeAlignmentFactor(CodeAlignmentFactor),<br>
DataAlignmentFactor(DataAlignmentFactor),<br>
ReturnAddressRegister(ReturnAddressRegister),<br>
- AugmentationData(AugmentationData),<br>
+ AugmentationData(std::move(AugmentationData)),<br>
FDEPointerEncoding(FDEPointerEncoding),<br>
- LSDAPointerEncoding(LSDAPointerEncoding) { }<br>
+ LSDAPointerEncoding(LSDAPointerEncoding) {}<br>
<br>
~CIE() override {}<br>
<br>
<br>
Modified: llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp?rev=270997&r1=270996&r2=270997&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp?rev=270997&r1=270996&r2=270997&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp (original)<br>
+++ llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp Fri May 27 09:27:24 2016<br>
@@ -7,16 +7,17 @@<br>
//<br>
//===----------------------------------------------------------------------===//<br>
<br>
-#include "llvm/ADT/STLExtras.h"<br>
+#include "llvm/ExecutionEngine/RuntimeDyldChecker.h"<br>
#include "RuntimeDyldCheckerImpl.h"<br>
#include "RuntimeDyldImpl.h"<br>
-#include "llvm/ExecutionEngine/RuntimeDyldChecker.h"<br>
+#include "llvm/ADT/STLExtras.h"<br>
#include "llvm/MC/MCContext.h"<br>
#include "llvm/MC/MCDisassembler/MCDisassembler.h"<br>
#include "llvm/MC/MCInst.h"<br>
#include "llvm/Support/Path.h"<br>
#include <cctype><br>
#include <memory><br>
+#include <utility><br>
<br>
#define DEBUG_TYPE "rtdyld"<br>
<br>
@@ -97,7 +98,8 @@ private:<br>
public:<br>
EvalResult() : Value(0), ErrorMsg("") {}<br>
EvalResult(uint64_t Value) : Value(Value), ErrorMsg("") {}<br>
- EvalResult(std::string ErrorMsg) : Value(0), ErrorMsg(ErrorMsg) {}<br>
+ EvalResult(std::string ErrorMsg)<br>
+ : Value(0), ErrorMsg(std::move(ErrorMsg)) {}<br>
uint64_t getValue() const { return Value; }<br>
bool hasError() const { return ErrorMsg != ""; }<br>
const std::string &getErrorMsg() const { return ErrorMsg; }<br>
<br>
Modified: llvm/trunk/lib/Linker/IRMover.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Linker/IRMover.cpp?rev=270997&r1=270996&r2=270997&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Linker/IRMover.cpp?rev=270997&r1=270996&r2=270997&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Linker/IRMover.cpp (original)<br>
+++ llvm/trunk/lib/Linker/IRMover.cpp Fri May 27 09:27:24 2016<br>
@@ -19,6 +19,7 @@<br>
#include "llvm/IR/TypeFinder.h"<br>
#include "llvm/Support/Error.h"<br>
#include "llvm/Transforms/Utils/Cloning.h"<br>
+#include <utility><br>
using namespace llvm;<br>
<br>
//===----------------------------------------------------------------------===//<br>
@@ -481,8 +482,9 @@ public:<br>
IRMover::IdentifiedStructTypeSet &Set, std::unique_ptr<Module> SrcM,<br>
ArrayRef<GlobalValue *> ValuesToLink,<br>
std::function<void(GlobalValue &, IRMover::ValueAdder)> AddLazyFor)<br>
- : DstM(DstM), SrcM(std::move(SrcM)), AddLazyFor(AddLazyFor), TypeMap(Set),<br>
- GValMaterializer(*this), LValMaterializer(*this), SharedMDs(SharedMDs),<br>
+ : DstM(DstM), SrcM(std::move(SrcM)), AddLazyFor(std::move(AddLazyFor)),<br>
+ TypeMap(Set), GValMaterializer(*this), LValMaterializer(*this),<br>
+ SharedMDs(SharedMDs),<br>
Mapper(ValueMap, RF_MoveDistinctMDs | RF_IgnoreMissingLocals, &TypeMap,<br>
&GValMaterializer),<br>
AliasMCID(Mapper.registerAlternateMappingContext(AliasValueMap,<br>
<br>
Modified: llvm/trunk/lib/MC/MCDisassembler/Disassembler.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCDisassembler/Disassembler.h?rev=270997&r1=270996&r2=270997&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCDisassembler/Disassembler.h?rev=270997&r1=270996&r2=270997&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/MC/MCDisassembler/Disassembler.h (original)<br>
+++ llvm/trunk/lib/MC/MCDisassembler/Disassembler.h Fri May 27 09:27:24 2016<br>
@@ -28,6 +28,7 @@<br>
#include "llvm/MC/MCSubtargetInfo.h"<br>
#include "llvm/Support/raw_ostream.h"<br>
#include <string><br>
+#include <utility><br>
<br>
namespace llvm {<br>
class Target;<br>
@@ -86,15 +87,12 @@ public:<br>
LLVMOpInfoCallback getOpInfo,<br>
LLVMSymbolLookupCallback symbolLookUp,<br>
const Target *theTarget, const MCAsmInfo *mAI,<br>
- const MCRegisterInfo *mRI,<br>
- const MCSubtargetInfo *mSI,<br>
- const MCInstrInfo *mII,<br>
- llvm::MCContext *ctx, const MCDisassembler *disAsm,<br>
- MCInstPrinter *iP) : TripleName(tripleName),<br>
- DisInfo(disInfo), TagType(tagType), GetOpInfo(getOpInfo),<br>
- SymbolLookUp(symbolLookUp), TheTarget(theTarget),<br>
- Options(0),<br>
- CommentStream(CommentsToEmit) {<br>
+ const MCRegisterInfo *mRI, const MCSubtargetInfo *mSI,<br>
+ const MCInstrInfo *mII, llvm::MCContext *ctx,<br>
+ const MCDisassembler *disAsm, MCInstPrinter *iP)<br>
+ : TripleName(std::move(tripleName)), DisInfo(disInfo), TagType(tagType),<br>
+ GetOpInfo(getOpInfo), SymbolLookUp(symbolLookUp), TheTarget(theTarget),<br>
+ Options(0), CommentStream(CommentsToEmit) {<br>
MAI.reset(mAI);<br>
MRI.reset(mRI);<br>
MSI.reset(mSI);<br>
<br>
Modified: llvm/trunk/lib/Target/ARM/Thumb2SizeReduction.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/Thumb2SizeReduction.cpp?rev=270997&r1=270996&r2=270997&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/Thumb2SizeReduction.cpp?rev=270997&r1=270996&r2=270997&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Target/ARM/Thumb2SizeReduction.cpp (original)<br>
+++ llvm/trunk/lib/Target/ARM/Thumb2SizeReduction.cpp Fri May 27 09:27:24 2016<br>
@@ -18,11 +18,12 @@<br>
#include "llvm/CodeGen/MachineFunctionPass.h"<br>
#include "llvm/CodeGen/MachineInstr.h"<br>
#include "llvm/CodeGen/MachineInstrBuilder.h"<br>
-#include "llvm/IR/Function.h" // To access Function attributes<br>
+#include "llvm/IR/Function.h" // To access Function attributes<br>
#include "llvm/Support/CommandLine.h"<br>
#include "llvm/Support/Debug.h"<br>
#include "llvm/Support/raw_ostream.h"<br>
#include "llvm/Target/TargetMachine.h"<br>
+#include <utility><br>
using namespace llvm;<br>
<br>
#define DEBUG_TYPE "t2-reduce-size"<br>
@@ -213,7 +214,7 @@ namespace {<br>
}<br>
<br>
Thumb2SizeReduce::Thumb2SizeReduce(std::function<bool(const Function &)> Ftor)<br>
- : MachineFunctionPass(ID), PredicateFtor(Ftor) {<br>
+ : MachineFunctionPass(ID), PredicateFtor(std::move(Ftor)) {<br>
OptimizeSize = MinimizeSize = false;<br>
for (unsigned i = 0, e = array_lengthof(ReduceTable); i != e; ++i) {<br>
unsigned FromOpc = ReduceTable[i].WideOpc;<br>
<br>
Modified: llvm/trunk/lib/Target/NVPTX/NVPTXMCExpr.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/NVPTX/NVPTXMCExpr.h?rev=270997&r1=270996&r2=270997&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/NVPTX/NVPTXMCExpr.h?rev=270997&r1=270996&r2=270997&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Target/NVPTX/NVPTXMCExpr.h (original)<br>
+++ llvm/trunk/lib/Target/NVPTX/NVPTXMCExpr.h Fri May 27 09:27:24 2016<br>
@@ -14,6 +14,7 @@<br>
<br>
#include "llvm/ADT/APFloat.h"<br>
#include "llvm/MC/MCExpr.h"<br>
+#include <utility><br>
<br>
namespace llvm {<br>
<br>
@@ -30,7 +31,7 @@ private:<br>
const APFloat Flt;<br>
<br>
explicit NVPTXFloatMCExpr(VariantKind Kind, APFloat Flt)<br>
- : Kind(Kind), Flt(Flt) {}<br>
+ : Kind(Kind), Flt(std::move(Flt)) {}<br>
<br>
public:<br>
/// @name Construction<br>
<br>
Modified: llvm/trunk/lib/Transforms/Instrumentation/PGOInstrumentation.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/PGOInstrumentation.cpp?rev=270997&r1=270996&r2=270997&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/PGOInstrumentation.cpp?rev=270997&r1=270996&r2=270997&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Transforms/Instrumentation/PGOInstrumentation.cpp (original)<br>
+++ llvm/trunk/lib/Transforms/Instrumentation/PGOInstrumentation.cpp Fri May 27 09:27:24 2016<br>
@@ -150,7 +150,7 @@ public:<br>
<br>
// Provide the profile filename as the parameter.<br>
PGOInstrumentationUseLegacyPass(std::string Filename = "")<br>
- : ModulePass(ID), ProfileFileName(Filename) {<br>
+ : ModulePass(ID), ProfileFileName(std::move(Filename)) {<br>
if (!PGOTestProfileFile.empty())<br>
ProfileFileName = PGOTestProfileFile;<br>
initializePGOInstrumentationUseLegacyPassPass(<br>
@@ -919,7 +919,7 @@ static bool annotateAllFunctions(<br>
}<br>
<br>
PGOInstrumentationUse::PGOInstrumentationUse(std::string Filename)<br>
- : ProfileFileName(Filename) {<br>
+ : ProfileFileName(std::move(Filename)) {<br>
if (!PGOTestProfileFile.empty())<br>
ProfileFileName = PGOTestProfileFile;<br>
}<br>
<br>
Modified: llvm/trunk/lib/Transforms/Scalar/LICM.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LICM.cpp?rev=270997&r1=270996&r2=270997&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LICM.cpp?rev=270997&r1=270996&r2=270997&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Transforms/Scalar/LICM.cpp (original)<br>
+++ llvm/trunk/lib/Transforms/Scalar/LICM.cpp Fri May 27 09:27:24 2016<br>
@@ -63,6 +63,7 @@<br>
#include "llvm/Transforms/Utils/LoopUtils.h"<br>
#include "llvm/Transforms/Utils/SSAUpdater.h"<br>
#include <algorithm><br>
+#include <utility><br>
using namespace llvm;<br>
<br>
#define DEBUG_TYPE "licm"<br>
@@ -811,7 +812,7 @@ public:<br>
const AAMDNodes &AATags)<br>
: LoadAndStorePromoter(Insts, S), SomePtr(SP), PointerMustAliases(PMA),<br>
LoopExitBlocks(LEB), LoopInsertPts(LIP), PredCache(PIC), AST(ast),<br>
- LI(li), DL(dl), Alignment(alignment), AATags(AATags) {}<br>
+ LI(li), DL(std::move(dl)), Alignment(alignment), AATags(AATags) {}<br>
<br>
bool isInstInList(Instruction *I,<br>
const SmallVectorImpl<Instruction *> &) const override {<br>
<br>
Modified: llvm/trunk/lib/Transforms/Scalar/LoopUnrollPass.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopUnrollPass.cpp?rev=270997&r1=270996&r2=270997&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopUnrollPass.cpp?rev=270997&r1=270996&r2=270997&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Transforms/Scalar/LoopUnrollPass.cpp (original)<br>
+++ llvm/trunk/lib/Transforms/Scalar/LoopUnrollPass.cpp Fri May 27 09:27:24 2016<br>
@@ -35,6 +35,7 @@<br>
#include "llvm/Transforms/Utils/LoopUtils.h"<br>
#include "llvm/Transforms/Utils/UnrollLoop.h"<br>
#include <climits><br>
+#include <utility><br>
<br>
using namespace llvm;<br>
<br>
@@ -939,8 +940,9 @@ public:<br>
LoopUnroll(Optional<unsigned> Threshold = None,<br>
Optional<unsigned> Count = None,<br>
Optional<bool> AllowPartial = None, Optional<bool> Runtime = None)<br>
- : LoopPass(ID), ProvidedCount(Count), ProvidedThreshold(Threshold),<br>
- ProvidedAllowPartial(AllowPartial), ProvidedRuntime(Runtime) {<br>
+ : LoopPass(ID), ProvidedCount(std::move(Count)),<br>
+ ProvidedThreshold(Threshold), ProvidedAllowPartial(AllowPartial),<br>
+ ProvidedRuntime(Runtime) {<br>
initializeLoopUnrollPass(*PassRegistry::getPassRegistry());<br>
}<br>
<br>
<br>
Modified: llvm/trunk/lib/Transforms/Scalar/SimplifyCFGPass.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/SimplifyCFGPass.cpp?rev=270997&r1=270996&r2=270997&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/SimplifyCFGPass.cpp?rev=270997&r1=270996&r2=270997&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Transforms/Scalar/SimplifyCFGPass.cpp (original)<br>
+++ llvm/trunk/lib/Transforms/Scalar/SimplifyCFGPass.cpp Fri May 27 09:27:24 2016<br>
@@ -21,14 +21,13 @@<br>
//<br>
//===----------------------------------------------------------------------===//<br>
<br>
-#include "llvm/Transforms/Scalar/SimplifyCFG.h"<br>
#include "llvm/ADT/SmallPtrSet.h"<br>
#include "llvm/ADT/SmallVector.h"<br>
#include "llvm/ADT/Statistic.h"<br>
-#include "llvm/Analysis/GlobalsModRef.h"<br>
#include "llvm/Analysis/AssumptionCache.h"<br>
-#include "llvm/Analysis/TargetTransformInfo.h"<br>
#include "llvm/Analysis/CFG.h"<br>
+#include "llvm/Analysis/GlobalsModRef.h"<br>
+#include "llvm/Analysis/TargetTransformInfo.h"<br>
#include "llvm/IR/Attributes.h"<br>
#include "llvm/IR/CFG.h"<br>
#include "llvm/IR/Constants.h"<br>
@@ -38,8 +37,10 @@<br>
#include "llvm/IR/Module.h"<br>
#include "llvm/Pass.h"<br>
#include "llvm/Support/CommandLine.h"<br>
-#include "llvm/Transforms/Utils/Local.h"<br>
#include "llvm/Transforms/Scalar.h"<br>
+#include "llvm/Transforms/Scalar/SimplifyCFG.h"<br>
+#include "llvm/Transforms/Utils/Local.h"<br>
+#include <utility><br>
using namespace llvm;<br>
<br>
#define DEBUG_TYPE "simplifycfg"<br>
@@ -204,7 +205,7 @@ struct CFGSimplifyPass : public Function<br>
<br>
CFGSimplifyPass(int T = -1,<br>
std::function<bool(const Function &)> Ftor = nullptr)<br>
- : FunctionPass(ID), PredicateFtor(Ftor) {<br>
+ : FunctionPass(ID), PredicateFtor(std::move(Ftor)) {<br>
BonusInstThreshold = (T == -1) ? UserBonusInstThreshold : unsigned(T);<br>
initializeCFGSimplifyPassPass(*PassRegistry::getPassRegistry());<br>
}<br>
<br>
Modified: llvm/trunk/tools/bugpoint/ToolRunner.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/ToolRunner.cpp?rev=270997&r1=270996&r2=270997&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/ToolRunner.cpp?rev=270997&r1=270996&r2=270997&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/tools/bugpoint/ToolRunner.cpp (original)<br>
+++ llvm/trunk/tools/bugpoint/ToolRunner.cpp Fri May 27 09:27:24 2016<br>
@@ -21,6 +21,7 @@<br>
#include "llvm/Support/raw_ostream.h"<br>
#include <fstream><br>
#include <sstream><br>
+#include <utility><br>
using namespace llvm;<br>
<br>
#define DEBUG_TYPE "toolrunner"<br>
@@ -272,9 +273,9 @@ namespace {<br>
std::string CompilerCommand;<br>
std::vector<std::string> CompilerArgs;<br>
public:<br>
- CustomCompiler(<br>
- const std::string &CompilerCmd, std::vector<std::string> CompArgs) :<br>
- CompilerCommand(CompilerCmd), CompilerArgs(CompArgs) {}<br>
+ CustomCompiler(const std::string &CompilerCmd,<br>
+ std::vector<std::string> CompArgs)<br>
+ : CompilerCommand(CompilerCmd), CompilerArgs(std::move(CompArgs)) {}<br>
<br>
void compileProgram(const std::string &Bitcode,<br>
std::string *Error,<br>
@@ -333,9 +334,9 @@ namespace {<br>
std::string ExecutionCommand;<br>
std::vector<std::string> ExecutorArgs;<br>
public:<br>
- CustomExecutor(<br>
- const std::string &ExecutionCmd, std::vector<std::string> ExecArgs) :<br>
- ExecutionCommand(ExecutionCmd), ExecutorArgs(ExecArgs) {}<br>
+ CustomExecutor(const std::string &ExecutionCmd,<br>
+ std::vector<std::string> ExecArgs)<br>
+ : ExecutionCommand(ExecutionCmd), ExecutorArgs(std::move(ExecArgs)) {}<br>
<br>
int ExecuteProgram(const std::string &Bitcode,<br>
const std::vector<std::string> &Args,<br>
<br>
Modified: llvm/trunk/tools/gold/gold-plugin.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/gold/gold-plugin.cpp?rev=270997&r1=270996&r2=270997&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/gold/gold-plugin.cpp?rev=270997&r1=270996&r2=270997&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/tools/gold/gold-plugin.cpp (original)<br>
+++ llvm/trunk/tools/gold/gold-plugin.cpp Fri May 27 09:27:24 2016<br>
@@ -51,6 +51,7 @@<br>
#include <list><br>
#include <plugin-api.h><br>
#include <system_error><br>
+#include <utility><br>
#include <vector><br>
<br>
// FIXME: remove this declaration when we stop maintaining Ubuntu Quantal and<br>
@@ -130,7 +131,8 @@ class ThinLTOTaskInfo {<br>
public:<br>
ThinLTOTaskInfo(std::unique_ptr<raw_fd_ostream> OS, std::string Filename,<br>
bool TempOutFile)<br>
- : OS(std::move(OS)), Filename(Filename), TempOutFile(TempOutFile) {}<br>
+ : OS(std::move(OS)), Filename(std::move(Filename)),<br>
+ TempOutFile(TempOutFile) {}<br>
<br>
/// Performs task related cleanup activities that must be done<br>
/// single-threaded (i.e. call backs to gold).<br>
@@ -904,7 +906,7 @@ public:<br>
const ModuleSummaryIndex *CombinedIndex, std::string Filename,<br>
StringMap<MemoryBufferRef> *ModuleMap)<br>
: M(std::move(M)), OS(OS), TaskID(TaskID), CombinedIndex(CombinedIndex),<br>
- SaveTempsFilename(Filename), ModuleMap(ModuleMap) {<br>
+ SaveTempsFilename(std::move(Filename)), ModuleMap(ModuleMap) {<br>
assert(options::thinlto == !!CombinedIndex &&<br>
"Expected module summary index iff performing ThinLTO");<br>
initTargetMachine();<br>
<br>
Modified: llvm/trunk/tools/llvm-link/llvm-link.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-link/llvm-link.cpp?rev=270997&r1=270996&r2=270997&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-link/llvm-link.cpp?rev=270997&r1=270996&r2=270997&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/tools/llvm-link/llvm-link.cpp (original)<br>
+++ llvm/trunk/tools/llvm-link/llvm-link.cpp Fri May 27 09:27:24 2016<br>
@@ -36,6 +36,7 @@<br>
#include "llvm/Transforms/Utils/FunctionImportUtils.h"<br>
<br>
#include <memory><br>
+#include <utility><br>
using namespace llvm;<br>
<br>
static cl::list<std::string><br>
@@ -146,7 +147,7 @@ public:<br>
ModuleLazyLoaderCache(std::function<std::unique_ptr<Module>(<br>
const char *argv0, const std::string &FileName)><br>
createLazyModule)<br>
- : createLazyModule(createLazyModule) {}<br>
+ : createLazyModule(std::move(createLazyModule)) {}<br>
<br>
/// Retrieve a Module from the cache or lazily load it on demand.<br>
Module &operator()(const char *argv0, const std::string &FileName);<br>
<br>
Modified: llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp?rev=270997&r1=270996&r2=270997&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp?rev=270997&r1=270996&r2=270997&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp (original)<br>
+++ llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp Fri May 27 09:27:24 2016<br>
@@ -59,6 +59,7 @@<br>
#include <cctype><br>
#include <cstring><br>
#include <system_error><br>
+#include <utility><br>
<br>
using namespace llvm;<br>
using namespace object;<br>
@@ -197,7 +198,7 @@ public:<br>
SectionFilterIterator(FilterPredicate P,<br>
llvm::object::section_iterator const &I,<br>
llvm::object::section_iterator const &E)<br>
- : Predicate(P), Iterator(I), End(E) {<br>
+ : Predicate(std::move(P)), Iterator(I), End(E) {<br>
ScanPredicate();<br>
}<br>
const llvm::object::SectionRef &operator*() const { return *Iterator; }<br>
@@ -224,7 +225,7 @@ private:<br>
class SectionFilter {<br>
public:<br>
SectionFilter(FilterPredicate P, llvm::object::ObjectFile const &O)<br>
- : Predicate(P), Object(O) {}<br>
+ : Predicate(std::move(P)), Object(O) {}<br>
SectionFilterIterator begin() {<br>
return SectionFilterIterator(Predicate, Object.section_begin(),<br>
Object.section_end());<br>
<br>
Modified: llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp?rev=270997&r1=270996&r2=270997&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp?rev=270997&r1=270996&r2=270997&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp (original)<br>
+++ llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp Fri May 27 09:27:24 2016<br>
@@ -27,6 +27,7 @@<br>
#include <algorithm><br>
#include <cassert><br>
#include <map><br>
+#include <utility><br>
#include <vector><br>
using namespace llvm;<br>
<br>
@@ -605,7 +606,8 @@ class IAPrinter {<br>
std::string Result;<br>
std::string AsmString;<br>
public:<br>
- IAPrinter(std::string R, std::string AS) : Result(R), AsmString(AS) {}<br>
+ IAPrinter(std::string R, std::string AS)<br>
+ : Result(std::move(R)), AsmString(std::move(AS)) {}<br>
<br>
void addCond(const std::string &C) { Conds.push_back(C); }<br>
<br>
<br>
Modified: llvm/trunk/utils/TableGen/CodeGenInstruction.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenInstruction.h?rev=270997&r1=270996&r2=270997&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenInstruction.h?rev=270997&r1=270996&r2=270997&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/utils/TableGen/CodeGenInstruction.h (original)<br>
+++ llvm/trunk/utils/TableGen/CodeGenInstruction.h Fri May 27 09:27:24 2016<br>
@@ -316,7 +316,8 @@ template <typename T> class ArrayRef;<br>
K_Reg<br>
} Kind;<br>
<br>
- ResultOperand(std::string N, Record *r) : Name(N), R(r), Kind(K_Record) {}<br>
+ ResultOperand(std::string N, Record *r)<br>
+ : Name(std::move(N)), R(r), Kind(K_Record) {}<br>
ResultOperand(int64_t I) : Imm(I), Kind(K_Imm) {}<br>
ResultOperand(Record *r) : R(r), Kind(K_Reg) {}<br>
<br>
<br>
Modified: llvm/trunk/utils/TableGen/FastISelEmitter.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/FastISelEmitter.cpp?rev=270997&r1=270996&r2=270997&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/FastISelEmitter.cpp?rev=270997&r1=270996&r2=270997&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/utils/TableGen/FastISelEmitter.cpp (original)<br>
+++ llvm/trunk/utils/TableGen/FastISelEmitter.cpp Fri May 27 09:27:24 2016<br>
@@ -24,6 +24,7 @@<br>
#include "llvm/TableGen/Error.h"<br>
#include "llvm/TableGen/Record.h"<br>
#include "llvm/TableGen/TableGenBackend.h"<br>
+#include <utility><br>
using namespace llvm;<br>
<br>
<br>
@@ -416,9 +417,7 @@ static std::string getLegalCName(std::st<br>
return OpName;<br>
}<br>
<br>
-FastISelMap::FastISelMap(std::string instns)<br>
- : InstNS(instns) {<br>
-}<br>
+FastISelMap::FastISelMap(std::string instns) : InstNS(std::move(instns)) {}<br>
<br>
static std::string PhyRegForNode(TreePatternNode *Op,<br>
const CodeGenTarget &Target) {<br>
<br>
Modified: llvm/trunk/utils/TableGen/FixedLenDecoderEmitter.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/FixedLenDecoderEmitter.cpp?rev=270997&r1=270996&r2=270997&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/FixedLenDecoderEmitter.cpp?rev=270997&r1=270996&r2=270997&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/utils/TableGen/FixedLenDecoderEmitter.cpp (original)<br>
+++ llvm/trunk/utils/TableGen/FixedLenDecoderEmitter.cpp Fri May 27 09:27:24 2016<br>
@@ -28,6 +28,7 @@<br>
#include "llvm/TableGen/Record.h"<br>
#include <map><br>
#include <string><br>
+#include <utility><br>
#include <vector><br>
<br>
using namespace llvm;<br>
@@ -47,7 +48,7 @@ struct OperandInfo {<br>
bool HasCompleteDecoder;<br>
<br>
OperandInfo(std::string D, bool HCD)<br>
- : Decoder(D), HasCompleteDecoder(HCD) { }<br>
+ : Decoder(std::move(D)), HasCompleteDecoder(HCD) {}<br>
<br>
void addField(unsigned Base, unsigned Width, unsigned Offset) {<br>
Fields.push_back(EncodingField(Base, Width, Offset));<br>
@@ -83,17 +84,16 @@ public:<br>
<br>
// Defaults preserved here for documentation, even though they aren't<br>
// strictly necessary given the way that this is currently being called.<br>
- FixedLenDecoderEmitter(RecordKeeper &R,<br>
- std::string PredicateNamespace,<br>
- std::string GPrefix = "if (",<br>
+ FixedLenDecoderEmitter(RecordKeeper &R, std::string PredicateNamespace,<br>
+ std::string GPrefix = "if (",<br>
std::string GPostfix = " == MCDisassembler::Fail)",<br>
- std::string ROK = "MCDisassembler::Success",<br>
- std::string RFail = "MCDisassembler::Fail",<br>
- std::string L = "") :<br>
- Target(R),<br>
- PredicateNamespace(PredicateNamespace),<br>
- GuardPrefix(GPrefix), GuardPostfix(GPostfix),<br>
- ReturnOK(ROK), ReturnFail(RFail), Locals(L) {}<br>
+ std::string ROK = "MCDisassembler::Success",<br>
+ std::string RFail = "MCDisassembler::Fail",<br>
+ std::string L = "")<br>
+ : Target(R), PredicateNamespace(std::move(PredicateNamespace)),<br>
+ GuardPrefix(std::move(GPrefix)), GuardPostfix(std::move(GPostfix)),<br>
+ ReturnOK(std::move(ROK)), ReturnFail(std::move(RFail)),<br>
+ Locals(std::move(L)) {}<br>
<br>
// Emit the decoder state machine table.<br>
void emitTable(formatted_raw_ostream &o, DecoderTable &Table,<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>