mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
Removed the non-target independent AsmToken::Register enum constant
from MCAsmLexer.h in preparation of supporting other targets. Changed the X86AsmParser code to reflect this by removing AsmLexer::LexPercent and looking for AsmToken::Percent when parsing in places that used AsmToken::Register. Then changed X86ATTAsmParser::ParseRegister to parse out registers as an AsmToken::Percent followed by an AsmToken::Identifier. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80929 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -101,17 +101,6 @@ AsmToken AsmLexer::LexIdentifier() {
|
||||
return AsmToken(AsmToken::Identifier, StringRef(TokStart, CurPtr - TokStart));
|
||||
}
|
||||
|
||||
/// LexPercent: Register: %[a-zA-Z0-9]+
|
||||
AsmToken AsmLexer::LexPercent() {
|
||||
if (!isalnum(*CurPtr))
|
||||
return AsmToken(AsmToken::Percent, StringRef(CurPtr, 1)); // Single %.
|
||||
|
||||
while (isalnum(*CurPtr))
|
||||
++CurPtr;
|
||||
|
||||
return AsmToken(AsmToken::Register, StringRef(TokStart, CurPtr - TokStart));
|
||||
}
|
||||
|
||||
/// LexSlash: Slash: /
|
||||
/// C-Style Comment: /* ... */
|
||||
AsmToken AsmLexer::LexSlash() {
|
||||
@@ -298,7 +287,7 @@ AsmToken AsmLexer::LexToken() {
|
||||
if (*CurPtr == '=')
|
||||
return ++CurPtr, AsmToken(AsmToken::ExclaimEqual, StringRef(TokStart, 2));
|
||||
return AsmToken(AsmToken::Exclaim, StringRef(TokStart, 1));
|
||||
case '%': return LexPercent();
|
||||
case '%': return AsmToken(AsmToken::Percent, StringRef(TokStart, 1));
|
||||
case '/': return LexSlash();
|
||||
case '#': return LexLineComment();
|
||||
case '"': return LexQuote();
|
||||
|
Reference in New Issue
Block a user