summaryrefslogtreecommitdiffstats
path: root/llvm/tools
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools')
-rw-r--r--llvm/tools/bugpoint/ToolRunner.cpp13
-rw-r--r--llvm/tools/gold/gold-plugin.cpp6
-rw-r--r--llvm/tools/llvm-link/llvm-link.cpp3
-rw-r--r--llvm/tools/llvm-objdump/llvm-objdump.cpp5
4 files changed, 16 insertions, 11 deletions
diff --git a/llvm/tools/bugpoint/ToolRunner.cpp b/llvm/tools/bugpoint/ToolRunner.cpp
index 2ccd6490512..4af4b10c4d7 100644
--- a/llvm/tools/bugpoint/ToolRunner.cpp
+++ b/llvm/tools/bugpoint/ToolRunner.cpp
@@ -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,
diff --git a/llvm/tools/gold/gold-plugin.cpp b/llvm/tools/gold/gold-plugin.cpp
index 87b07181dac..44cdee4da7d 100644
--- a/llvm/tools/gold/gold-plugin.cpp
+++ b/llvm/tools/gold/gold-plugin.cpp
@@ -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();
diff --git a/llvm/tools/llvm-link/llvm-link.cpp b/llvm/tools/llvm-link/llvm-link.cpp
index 0e720bd06ea..7e0573a084c 100644
--- a/llvm/tools/llvm-link/llvm-link.cpp
+++ b/llvm/tools/llvm-link/llvm-link.cpp
@@ -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);
diff --git a/llvm/tools/llvm-objdump/llvm-objdump.cpp b/llvm/tools/llvm-objdump/llvm-objdump.cpp
index dfdb4ba7d7c..3089ff75303 100644
--- a/llvm/tools/llvm-objdump/llvm-objdump.cpp
+++ b/llvm/tools/llvm-objdump/llvm-objdump.cpp
@@ -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());
OpenPOWER on IntegriCloud