summaryrefslogtreecommitdiff
path: root/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp')
-rw-r--r--lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp
index 58ce88a68f23c..090b9a3857e3c 100644
--- a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp
+++ b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp
@@ -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.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; }
@@ -582,7 +584,7 @@ private:
// Returns a pair containing the result of the slice operation, plus the
// expression remaining to be parsed.
std::pair<EvalResult, StringRef>
- evalSliceExpr(std::pair<EvalResult, StringRef> Ctx) const {
+ evalSliceExpr(const std::pair<EvalResult, StringRef> &Ctx) const {
EvalResult SubExprResult;
StringRef RemainingExpr;
std::tie(SubExprResult, RemainingExpr) = Ctx;
@@ -626,7 +628,7 @@ private:
// Returns a pair containing the ultimate result of evaluating the
// expression, plus the expression remaining to be evaluated.
std::pair<EvalResult, StringRef>
- evalComplexExpr(std::pair<EvalResult, StringRef> LHSAndRemaining,
+ evalComplexExpr(const std::pair<EvalResult, StringRef> &LHSAndRemaining,
ParseContext PCtx) const {
EvalResult LHSResult;
StringRef RemainingExpr;