[PATCH] D76962: [MC] Parse directives with arguments as macro arguments
Nick Desaulniers via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 27 18:12:39 PDT 2020
nickdesaulniers added a comment.
Thanks for the patch!
================
Comment at: llvm/lib/MC/MCParser/AsmParser.cpp:2636
+ AsmToken &Tok = MA.back();
+ if (Tok.is(AsmToken::Identifier) && Tok.getString().startswith(".")) {
+ while (!Lexer.is(AsmToken::Comma) && !Lexer.is(AsmToken::EndOfStatement)) {
----------------
Is this the most precise way to check for directives? I see `DirectiveKind`, and `DirectiveKindMap`, maybe there's a way to verify that the `Tok` is a valid directive?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76962/new/
https://reviews.llvm.org/D76962
More information about the llvm-commits
mailing list