summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/ARM/invalid-target.ll
diff options
context:
space:
mode:
authorRenato Golin <renato.golin@linaro.org>2014-11-17 14:08:57 +0000
committerRenato Golin <renato.golin@linaro.org>2014-11-17 14:08:57 +0000
commit609bf9236579a525f9446621f16e3d9bb6b2b4f6 (patch)
tree1e5111939e911a8bd6bde35962fc5407dedfc2eb /llvm/test/CodeGen/ARM/invalid-target.ll
parent6a3fd8361fcf385d1b85813cd2fc423417182030 (diff)
downloadbcm5719-llvm-609bf9236579a525f9446621f16e3d9bb6b2b4f6.tar.gz
bcm5719-llvm-609bf9236579a525f9446621f16e3d9bb6b2b4f6.zip
Fix ARM triple parsing
The triple parser should only accept existing architecture names when the triple starts with armv, armebv, thumbv or thumbebv. Patch by Gabor Ballabas. llvm-svn: 222129
Diffstat (limited to 'llvm/test/CodeGen/ARM/invalid-target.ll')
-rw-r--r--llvm/test/CodeGen/ARM/invalid-target.ll32
1 files changed, 32 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/ARM/invalid-target.ll b/llvm/test/CodeGen/ARM/invalid-target.ll
new file mode 100644
index 00000000000..bb0ada4c2fd
--- /dev/null
+++ b/llvm/test/CodeGen/ARM/invalid-target.ll
@@ -0,0 +1,32 @@
+; RUN: not llc -mtriple armvinvalid-linux-gnueabi %s -o - 2>&1 | \
+; RUN: FileCheck %s --check-prefix=ARMVINVALID
+
+; RUN: not llc -mtriple armebvinvalid-linux-gnueabi %s -o - 2>&1 | \
+; RUN: FileCheck %s --check-prefix=ARMEBVINVALID
+
+; RUN: not llc -mtriple thumbvinvalid-linux-gnueabi %s -o - 2>&1 | \
+; RUN: FileCheck %s --check-prefix=THUMBVINVALID
+
+; RUN: not llc -mtriple thumbebvinvalid-linux-gnueabi %s -o - 2>&1 | \
+; RUN: FileCheck %s --check-prefix=THUMBEBVINVALID
+
+; RUN: not llc -mtriple thumbv2-linux-gnueabi %s -o - 2>&1 | \
+; RUN: FileCheck %s --check-prefix=THUMBV2
+
+; RUN: not llc -mtriple thumbv3-linux-gnueabi %s -o - 2>&1 | \
+; RUN: FileCheck %s --check-prefix=THUMBV3
+
+; RUN: not llc -mtriple arm64invalid-linux-gnu %s -o - 2>&1 | \
+; RUN: FileCheck %s --check-prefix=ARM64INVALID
+
+; RUN: not llc -mtriple aarch64invalid-linux-gnu %s -o - 2>&1 | \
+; RUN: FileCheck %s --check-prefix=AARCH64INVALID
+
+; ARMVINVALID: error: unable to get target for 'armvinvalid--linux-gnueabi'
+; ARMEBVINVALID: error: unable to get target for 'armebvinvalid--linux-gnueabi'
+; THUMBVINVALID: error: unable to get target for 'thumbvinvalid--linux-gnueabi'
+; THUMBEBVINVALID: error: unable to get target for 'thumbebvinvalid--linux-gnueabi'
+; THUMBV2: error: unable to get target for 'thumbv2--linux-gnueabi'
+; THUMBV3: error: unable to get target for 'thumbv3--linux-gnueabi'
+; ARM64INVALID: error: unable to get target for 'arm64invalid--linux-gnu'
+; AARCH64INVALID: error: unable to get target for 'aarch64invalid--linux-gnu'
OpenPOWER on IntegriCloud