[PATCH] D72686: [AsmParser] Make directives case insensitive.

David Spickett via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 15 02:10:17 PST 2020


DavidSpickett added a comment.

> This suggests that there are exceptions, do you which targets and directives don't follow this?

In general, only ABORT is called out as allowed for COFF output, which is more of a compatibility note. aBoRt works fine too.

I went through the AS target documentation and found the following targets where directives were not all lower case:

- ARC
- MMIX (all upper case, though GCC accepts any)
- V850

Along the way I realized that in LLVM each target has it's own <target>AsmParser::ParseDirective. Some of which use .lower() some don't. So I think I'll reduce the scope of this to allow any case for the generic directives. Leaving aliases and target specific directives as they are.
(with a follow up change to the Arm/AArch64 parsers where I know any case is fine)

Does that approach make sense?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D72686





More information about the llvm-commits mailing list