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