Mercurial > hg > CbC > CbC_llvm
diff lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp @ 120:1172e4bd9c6f
update 4.0.0
author | mir3636 |
---|---|
date | Fri, 25 Nov 2016 19:14:25 +0900 |
parents | 7d135dc70f03 |
children | 803732b1fca8 |
line wrap: on
line diff
--- a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp Tue Jan 26 22:56:36 2016 +0900 +++ b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp Fri Nov 25 19:14:25 2016 +0900 @@ -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 @@ 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; } @@ -215,7 +217,7 @@ // given symbol and get the value of the requested operand. // Returns an error if the instruction cannot be decoded, or the requested // operand is not an immediate. - // On success, retuns a pair containing the value of the operand, plus + // On success, returns a pair containing the value of the operand, plus // the expression remaining to be evaluated. std::pair<EvalResult, StringRef> evalDecodeOperand(StringRef Expr) const { if (!Expr.startswith("(")) @@ -461,7 +463,7 @@ Expr.substr(FirstNonDigit)); } - // Evaluate a constant numeric expression (hexidecimal or decimal) and + // Evaluate a constant numeric expression (hexadecimal or decimal) and // return a pair containing the result, and the expression remaining to be // evaluated. std::pair<EvalResult, StringRef> evalNumberExpr(StringRef Expr) const { @@ -582,7 +584,7 @@ // 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 @@ // 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;