From df5c2caf0fc0d59d4d2e0ce99da4aa58f204791a Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Wed, 6 Jan 2021 14:11:08 +0000 Subject: [PATCH] [MIPS] MipsAsmParser - Pass Twine by const reference instead of by value. NFCI. --- llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp b/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp index 9dbbdeb..e4d61f8 100644 --- a/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp +++ b/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp @@ -352,8 +352,8 @@ class MipsAsmParser : public MCTargetAsmParser { bool expandSaaAddr(MCInst &Inst, SMLoc IDLoc, MCStreamer &Out, const MCSubtargetInfo *STI); - bool reportParseError(Twine ErrorMsg); - bool reportParseError(SMLoc Loc, Twine ErrorMsg); + bool reportParseError(const Twine &ErrorMsg); + bool reportParseError(SMLoc Loc, const Twine &ErrorMsg); bool parseMemOffset(const MCExpr *&Res, bool isParenExpr); @@ -6982,12 +6982,12 @@ bool MipsAsmParser::ParseInstruction(ParseInstructionInfo &Info, StringRef Name, // FIXME: Given that these have the same name, these should both be // consistent on affecting the Parser. -bool MipsAsmParser::reportParseError(Twine ErrorMsg) { +bool MipsAsmParser::reportParseError(const Twine &ErrorMsg) { SMLoc Loc = getLexer().getLoc(); return Error(Loc, ErrorMsg); } -bool MipsAsmParser::reportParseError(SMLoc Loc, Twine ErrorMsg) { +bool MipsAsmParser::reportParseError(SMLoc Loc, const Twine &ErrorMsg) { return Error(Loc, ErrorMsg); } -- 2.7.4