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

David Spickett via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 14 02:00:41 PST 2020


DavidSpickett created this revision.
DavidSpickett added a reviewer: olista01.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
DavidSpickett added a comment.

Direct link to Bugzilla: https://bugs.llvm.org/show_bug.cgi?id=39527

I chose to test one directive and one directive alias, instead of trying to create a file with one of every alias. Maybe it should have a few more than one of each though.


GCC will accept any case for assembler directives.
For example ".abort" and ".ABORT" (even ".aBoRt")
are equivalent.

https://sourceware.org/binutils/docs/as/Pseudo-Ops.html#Pseudo-Ops
"The names are case insensitive for most targets,
and usually written in lower case."

Do the same for llvm-mc by changing the interface
to DirectiveKindMap to lower strings on lookup and 
insert.

This for Bugzilla #39527.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D72686

Files:
  llvm/lib/MC/MCParser/AsmParser.cpp
  llvm/test/MC/AsmParser/directive_case_insensitive.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72686.237885.patch
Type: text/x-patch
Size: 16088 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200114/bd41c8cd/attachment.bin>


More information about the llvm-commits mailing list