[PATCH] D36405: [AsmParser] Hash is not a comment on some targets

Nirav Dave via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 8 08:52:17 PDT 2017

niravd added a comment.

Hmm, looking around the only cases I see is that after an assembly label # non-directives are accepted by GCC (here's an example in the wild: https://github.com/android/platform_bionic/blob/master/libc/arch-x86/bionic/__bionic_clone.S). Looking at the parser we do have an explicit check for that in the parser so this should be okay. I also see that at least the arm GCC 4.8.4 errors on hash non-directives at the end of line with various assembly directives / instructions. I suspect there are more test cases that will need to be fixed.

This change should also modify MCAsmParser::parseToken and parseEOL and parseStatement where we special case Hash tokens as comments. A quick check on the tests show a few 2 more llvm tests that need minor fixing up.



More information about the llvm-commits mailing list