[PATCH] D76962: [MC] Parse directives with arguments as macro arguments

Jian Cai via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 27 18:12:40 PDT 2020


jcai19 marked an inline comment as done.
jcai19 added inline comments.


================
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)) {
----------------
nickdesaulniers wrote:
> 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?
Right that's a good point I'll investigate further.


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