[PATCH] D38545: [MC] - llvm-mc hangs on non-english characters.
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 5 01:17:52 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL314973: [MC] - llvm-mc hangs on non-english characters. (authored by grimar).
Changed prior to commit:
https://reviews.llvm.org/D38545?vs=117676&id=117781#toc
Repository:
rL LLVM
https://reviews.llvm.org/D38545
Files:
llvm/trunk/lib/MC/MCParser/ELFAsmParser.cpp
llvm/trunk/test/MC/AsmParser/Inputs/non-english-characters-comments.s
llvm/trunk/test/MC/AsmParser/Inputs/non-english-characters-section-name.s
llvm/trunk/test/MC/AsmParser/non-english-characters.s
Index: llvm/trunk/test/MC/AsmParser/Inputs/non-english-characters-comments.s
===================================================================
--- llvm/trunk/test/MC/AsmParser/Inputs/non-english-characters-comments.s
+++ llvm/trunk/test/MC/AsmParser/Inputs/non-english-characters-comments.s
@@ -0,0 +1,10 @@
+# 0bム
+# 0xム
+# .ム4
+# .Xム
+# .1ム
+# .1eム
+# 0x.ム
+# 0x0pム
+.intel_syntax
+# 1ム
Index: llvm/trunk/test/MC/AsmParser/Inputs/non-english-characters-section-name.s
===================================================================
--- llvm/trunk/test/MC/AsmParser/Inputs/non-english-characters-section-name.s
+++ llvm/trunk/test/MC/AsmParser/Inputs/non-english-characters-section-name.s
@@ -0,0 +1 @@
+.section .ñ
Index: llvm/trunk/test/MC/AsmParser/non-english-characters.s
===================================================================
--- llvm/trunk/test/MC/AsmParser/non-english-characters.s
+++ llvm/trunk/test/MC/AsmParser/non-english-characters.s
@@ -1,14 +1,9 @@
-# RUN: llvm-mc -triple i386-linux-gnu -filetype=obj -o %t %s
+# RUN: llvm-mc -triple i386-linux-gnu -filetype=obj -o %t \
+# RUN: %S/Inputs/non-english-characters-comments.s
# RUN: llvm-readobj %t | FileCheck %s
# CHECK: Format: ELF32-i386
-# 0bム
-# 0xム
-# .ム4
-# .Xム
-# .1ム
-# .1eム
-# 0x.ム
-# 0x0pム
-.intel_syntax
-# 1ム
+# RUN: not llvm-mc -triple i386-linux-gnu -filetype=obj -o %t \
+# RUN: %S/Inputs/non-english-characters-section-name.s 2>&1 | \
+# RUN: FileCheck %s --check-prefix=ERR
+# ERR: invalid character in input
Index: llvm/trunk/lib/MC/MCParser/ELFAsmParser.cpp
===================================================================
--- llvm/trunk/lib/MC/MCParser/ELFAsmParser.cpp
+++ llvm/trunk/lib/MC/MCParser/ELFAsmParser.cpp
@@ -247,7 +247,7 @@
return false;
}
- while (true) {
+ while (!getParser().hasPendingError()) {
SMLoc PrevLoc = getLexer().getLoc();
if (getLexer().is(AsmToken::Comma) ||
getLexer().is(AsmToken::EndOfStatement))
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38545.117781.patch
Type: text/x-patch
Size: 2017 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171005/f8197392/attachment.bin>
More information about the llvm-commits
mailing list