[PATCH] D98519: [M68k] Add support for Motorola literal syntax to AsmParser

Anirudh Prasad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 2 10:27:39 PDT 2021


anirudhp added inline comments.


================
Comment at: llvm/lib/MC/MCParser/AsmLexer.cpp:36
   AllowAtInIdentifier = !StringRef(MAI.getCommentString()).startswith("@");
+  LexMotorolaIntegers = MAI.shouldUseMotorolaIntegers();
 }
----------------
If you're setting this in the constructor, I'm hoping you're aware that for any other invocations of the AsmParser instance, except from llvm-mc, the lexing of motorola integers will not work as "expected", until the `UseMotorolaIntegers` attribute is explicitly set in the Motorola's inherited version of `MCAsmInfo`

If the only intended invocation is from llvm-mc for now, then maybe it makes sense to remove the MCAsmInfo attribute completely, since you already declared `LexMotorolaIntegers` as `LexMotorolaIntegers = false` in MCAsmLexer.h.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98519/new/

https://reviews.llvm.org/D98519



More information about the llvm-commits mailing list