summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorYunzhong Gao <Yunzhong_Gao@playstation.sony.com>2015-01-24 04:23:08 +0000
committerYunzhong Gao <Yunzhong_Gao@playstation.sony.com>2015-01-24 04:23:08 +0000
commita8cf495a1592f9d2deddd1c39ce57e81dcc426e5 (patch)
treee15bd902ae91260fe3a6f9f9c1e20f79916f02f4 /llvm/test
parent83ba269e4bab408c98327060fd743bc7f5ccd54a (diff)
downloadbcm5719-llvm-a8cf495a1592f9d2deddd1c39ce57e81dcc426e5.tar.gz
bcm5719-llvm-a8cf495a1592f9d2deddd1c39ce57e81dcc426e5.zip
If we see UTF-8 BOM sequence at the beginning of a response file, we shall
remove these bytes before parsing. Phabricator Revision: http://reviews.llvm.org/D7156 llvm-svn: 226988
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/Other/Inputs/utf8-bom-response1
-rw-r--r--llvm/test/Other/Inputs/utf8-response1
-rw-r--r--llvm/test/Other/ResponseFile.ll5
3 files changed, 7 insertions, 0 deletions
diff --git a/llvm/test/Other/Inputs/utf8-bom-response b/llvm/test/Other/Inputs/utf8-bom-response
new file mode 100644
index 00000000000..9dae3158ecd
--- /dev/null
+++ b/llvm/test/Other/Inputs/utf8-bom-response
@@ -0,0 +1 @@
+-help
diff --git a/llvm/test/Other/Inputs/utf8-response b/llvm/test/Other/Inputs/utf8-response
new file mode 100644
index 00000000000..97f455ac44e
--- /dev/null
+++ b/llvm/test/Other/Inputs/utf8-response
@@ -0,0 +1 @@
+-help
diff --git a/llvm/test/Other/ResponseFile.ll b/llvm/test/Other/ResponseFile.ll
index 914e5480f20..92648b86f5f 100644
--- a/llvm/test/Other/ResponseFile.ll
+++ b/llvm/test/Other/ResponseFile.ll
@@ -6,6 +6,11 @@
; RUN: llvm-as @%t.list2 -o %t.bc
; RUN: llvm-nm %t.bc 2>&1 | FileCheck %s
+; When the response file begins with UTF8 BOM sequence, we shall remove them.
+; Neither command below should return a "Could not open input file" error.
+; RUN: llvm-as @%S/Inputs/utf8-response > /dev/null
+; RUN: llvm-as @%S/Inputs/utf8-bom-response > /dev/null
+
; CHECK: T foobar
define void @foobar() {
OpenPOWER on IntegriCloud