[llvm] r204818 - [mips] Rename function in MipsAsmParser.
Matheus Almeida
matheus.almeida at imgtec.com
Wed Mar 26 08:24:37 PDT 2014
Author: matheusalmeida
Date: Wed Mar 26 10:24:36 2014
New Revision: 204818
URL: http://llvm.org/viewvc/llvm-project?rev=204818&view=rev
Log:
[mips] Rename function in MipsAsmParser.
parseDirectiveWord is a generic function that parses an expression which
means there's no need for it to have such an specific name. Renaming it to
parseDataDirective so that it can also be used to handle .dword directives[1].
[1]To be added in a follow up commit.
No functional changes.
Modified:
llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
Modified: llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp?rev=204818&r1=204817&r2=204818&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp (original)
+++ llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp Wed Mar 26 10:24:36 2014
@@ -209,7 +209,7 @@ class MipsAsmParser : public MCTargetAsm
bool parseSetAssignment();
- bool parseDirectiveWord(unsigned Size, SMLoc L);
+ bool parseDataDirective(unsigned Size, SMLoc L);
bool parseDirectiveGpWord();
MCSymbolRefExpr::VariantKind getVariantKind(StringRef Symbol);
@@ -2545,9 +2545,9 @@ bool MipsAsmParser::parseDirectiveSet()
return true;
}
-/// parseDirectiveWord
+/// parseDataDirective
/// ::= .word [ expression (, expression)* ]
-bool MipsAsmParser::parseDirectiveWord(unsigned Size, SMLoc L) {
+bool MipsAsmParser::parseDataDirective(unsigned Size, SMLoc L) {
if (getLexer().isNot(AsmToken::EndOfStatement)) {
for (;;) {
const MCExpr *Value;
@@ -2670,7 +2670,7 @@ bool MipsAsmParser::ParseDirective(AsmTo
}
if (IDVal == ".word") {
- parseDirectiveWord(4, DirectiveID.getLoc());
+ parseDataDirective(4, DirectiveID.getLoc());
return false;
}
More information about the llvm-commits
mailing list