mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-23 14:25:07 +00:00
MCAsmParser: relax declaration parsing
The Linux kernel defines empty macros for compatibility with ARM UAL syntax. The comma after the name is optional, and if present can be safely lexed. This improves compatibility with the GNU assembler. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201474 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -3152,12 +3152,15 @@ bool AsmParser::parseDirectiveMacrosOnOff(StringRef Directive) {
|
||||
}
|
||||
|
||||
/// parseDirectiveMacro
|
||||
/// ::= .macro name [parameters]
|
||||
/// ::= .macro name[,] [parameters]
|
||||
bool AsmParser::parseDirectiveMacro(SMLoc DirectiveLoc) {
|
||||
StringRef Name;
|
||||
if (parseIdentifier(Name))
|
||||
return TokError("expected identifier in '.macro' directive");
|
||||
|
||||
if (getLexer().is(AsmToken::Comma))
|
||||
Lex();
|
||||
|
||||
MCAsmMacroParameters Parameters;
|
||||
while (getLexer().isNot(AsmToken::EndOfStatement)) {
|
||||
MCAsmMacroParameter Parameter;
|
||||
|
Reference in New Issue
Block a user