OSDN Git Service

[AsmParser] Recommit: Hash is not a comment on some targets
authorOliver Stannard <oliver.stannard@arm.com>
Mon, 21 Aug 2017 09:58:37 +0000 (09:58 +0000)
committerOliver Stannard <oliver.stannard@arm.com>
Mon, 21 Aug 2017 09:58:37 +0000 (09:58 +0000)
commite8fad78d5a5dc76648fbffdfec5d9cb8ea38c7cf
tree1642b2c04dc8b47860adf6351b32d20b202c647b
parent7c7e6bed7bf1be3e5ce1a94909d67a4dc7eb300d
[AsmParser] Recommit: Hash is not a comment on some targets

Re-committing after r311325 fixed an unintentional use of '#' comments in
clang.

The '#' token is not a comment for all targets (on ARM and AArch64 it marks an
immediate operand), so we shouldn't treat it as such.

Comments are already converted to AsmToken::EndOfStatement by
AsmLexer::LexLineComment, so this check was unnecessary.

Differential Revision: https://reviews.llvm.org/D36405

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311326 91177308-0d34-0410-b5e6-96231b3b80d8
lib/MC/MCParser/AsmParser.cpp
lib/MC/MCParser/MCAsmParser.cpp
test/DebugInfo/AArch64/asan-stack-vars.ll
test/ExecutionEngine/RuntimeDyld/AArch64/ELF_ARM64_relocations.s
test/MC/ARM/directive_parsing.s
test/MC/AsmParser/AArch64/directive-parse-err.s