diff options
author | Colin LeMahieu <colinl@codeaurora.org> | 2015-11-09 00:31:07 +0000 |
---|---|---|
committer | Colin LeMahieu <colinl@codeaurora.org> | 2015-11-09 00:31:07 +0000 |
commit | 8a0453e23abf27433b7539b2da2060d2df9fb39c (patch) | |
tree | 33be159623c6ec1440fc54a8ac61285d12d555ab /llvm/lib/MC | |
parent | 87f5e80614a265b07d53cbb3b0ccf23ad090382b (diff) | |
download | bcm5719-llvm-8a0453e23abf27433b7539b2da2060d2df9fb39c.tar.gz bcm5719-llvm-8a0453e23abf27433b7539b2da2060d2df9fb39c.zip |
[AsmParser] Backends can parameterize ASM tokenization.
llvm-svn: 252439
Diffstat (limited to 'llvm/lib/MC')
-rw-r--r-- | llvm/lib/MC/MCParser/AsmParser.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCParser/AsmParser.cpp b/llvm/lib/MC/MCParser/AsmParser.cpp index aa3489a0573..245ba44a249 100644 --- a/llvm/lib/MC/MCParser/AsmParser.cpp +++ b/llvm/lib/MC/MCParser/AsmParser.cpp @@ -1334,6 +1334,15 @@ bool AsmParser::parseStatement(ParseStatementInfo &Info, // Treat '.' as a valid identifier in this context. Lex(); IDVal = "."; + } else if (Lexer.is(AsmToken::LCurly)) { + // Treat '{' as a valid identifier in this context. + Lex(); + IDVal = "{"; + + } else if (Lexer.is(AsmToken::RCurly)) { + // Treat '}' as a valid identifier in this context. + Lex(); + IDVal = "}"; } else if (parseIdentifier(IDVal)) { if (!TheCondState.Ignore) return TokError("unexpected token at start of statement"); |