]> granicus.if.org Git - llvm/commit
[MC] - llvm-mc hangs on non-english characters.
authorGeorge Rimar <grimar@accesssoftek.com>
Thu, 5 Oct 2017 08:15:55 +0000 (08:15 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Thu, 5 Oct 2017 08:15:55 +0000 (08:15 +0000)
commitfbdce7000bfca57ab473b6bd5c13d0f7db7a68f7
tree214e3a6314ba7ee853ff1ece7b41b04b9db225ba
parentbdbb17febd5244330def581cc5dfc42282e52e48
[MC] - llvm-mc hangs on non-english characters.

Currently llvm-mc just hangs inside infinite loop
while trying to parse file which has ".section .с" inside,
where section name is non-english character.
Patch fixes the issue.

In this patch I also moved content of non-english-characters.s
to test/MC/AsmParser/Inputs folder  so that non-english-characters.s
becomes a single testcase for all invalid inputs containing non-english
symbols. That is convinent because llvm-mc otherwise tries
to parse and tokenize the whole testcase file with tools invocations and
it is harder to isolate the issue.

Differential revision: https://reviews.llvm.org/D38545

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314973 91177308-0d34-0410-b5e6-96231b3b80d8
lib/MC/MCParser/ELFAsmParser.cpp
test/MC/AsmParser/Inputs/non-english-characters-comments.s [new file with mode: 0644]
test/MC/AsmParser/Inputs/non-english-characters-section-name.s [new file with mode: 0644]
test/MC/AsmParser/non-english-characters.s