diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:41:05 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:41:05 +0000 |
commit | 01095a5d43bbfde13731688ddcf6048ebb8b7721 (patch) | |
tree | 4def12e759965de927d963ac65840d663ef9d1ea /lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp | |
parent | f0f4822ed4b66e3579e92a89f368f8fb860e218e (diff) |
Diffstat (limited to 'lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp')
-rw-r--r-- | lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp | 14 |
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; |