diff options
author | Eric Astor <epastor@google.com> | 2020-09-23 13:57:43 -0400 |
---|---|---|
committer | Eric Astor <epastor@google.com> | 2020-09-23 13:59:34 -0400 |
commit | b901b6ab173ac77edfe97e0dbd138410b940b4bc (patch) | |
tree | e7153606927dd90d849746a215f705d15756bcd7 /llvm/lib/MC/MCParser/MasmParser.cpp | |
parent | 7a3c643c35590df67716dfe3e3c60195ae385e43 (diff) | |
download | llvm-b901b6ab173ac77edfe97e0dbd138410b940b4bc.zip llvm-b901b6ab173ac77edfe97e0dbd138410b940b4bc.tar.gz llvm-b901b6ab173ac77edfe97e0dbd138410b940b4bc.tar.bz2 |
Revert "[ms] [llvm-ml] Add support for .radix directive, and accept all radix specifiers"
This reverts commit 5dd1b6d612655c9006ba97a8b6487ded80719b48.
Diffstat (limited to 'llvm/lib/MC/MCParser/MasmParser.cpp')
-rw-r--r-- | llvm/lib/MC/MCParser/MasmParser.cpp | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/llvm/lib/MC/MCParser/MasmParser.cpp b/llvm/lib/MC/MCParser/MasmParser.cpp index cdefc06..ca9b2df 100644 --- a/llvm/lib/MC/MCParser/MasmParser.cpp +++ b/llvm/lib/MC/MCParser/MasmParser.cpp @@ -732,7 +732,6 @@ private: DK_SAVEREG, DK_SAVEXMM128, DK_SETFRAME, - DK_RADIX, }; /// Maps directive name --> DirectiveKind enum, for directives parsed by this @@ -965,9 +964,6 @@ private: // ".erre" or ".errnz", depending on ExpectZero. bool parseDirectiveErrorIfe(SMLoc DirectiveLoc, bool ExpectZero); - // ".radix" - bool parseDirectiveRadix(SMLoc DirectiveLoc); - // "echo" bool parseDirectiveEcho(); @@ -2288,8 +2284,6 @@ bool MasmParser::parseStatement(ParseStatementInfo &Info, return parseDirectiveErrorIfe(IDLoc, true); case DK_ERRNZ: return parseDirectiveErrorIfe(IDLoc, false); - case DK_RADIX: - return parseDirectiveRadix(IDLoc); case DK_ECHO: return parseDirectiveEcho(); } @@ -6349,7 +6343,6 @@ void MasmParser::initializeDirectiveKindMap() { DirectiveKindMap[".savereg"] = DK_SAVEREG; DirectiveKindMap[".savexmm128"] = DK_SAVEXMM128; DirectiveKindMap[".setframe"] = DK_SETFRAME; - DirectiveKindMap[".radix"] = DK_RADIX; // DirectiveKindMap[".altmacro"] = DK_ALTMACRO; // DirectiveKindMap[".noaltmacro"] = DK_NOALTMACRO; DirectiveKindMap["db"] = DK_DB; @@ -6591,22 +6584,6 @@ bool MasmParser::parseDirectiveMSAlign(SMLoc IDLoc, ParseStatementInfo &Info) { return false; } -bool MasmParser::parseDirectiveRadix(SMLoc DirectiveLoc) { - const SMLoc Loc = getLexer().getLoc(); - StringRef RadixString = parseStringToEndOfStatement().trim(); - unsigned Radix; - if (RadixString.getAsInteger(10, Radix)) { - return Error(Loc, - "radix must be a decimal number in the range 2 to 16; was " + - RadixString); - } - if (Radix < 2 || Radix > 16) - return Error(Loc, "radix must be in the range 2 to 16; was " + - std::to_string(Radix)); - getLexer().setDefaultRadix(Radix); - return false; -} - bool MasmParser::parseDirectiveEcho() { StringRef Message = parseStringToEndOfStatement(); Lex(); // eat end of statement |