summaryrefslogtreecommitdiff
path: root/test/Driver
diff options
context:
space:
mode:
authorJohn Brawn <john.brawn@arm.com>2015-05-21 12:19:49 +0000
committerJohn Brawn <john.brawn@arm.com>2015-05-21 12:19:49 +0000
commit8bfeeffa350e1e32d1b487cd414d673988bd148a (patch)
tree308aa781c3628f83ed8fc1aa4d477179a232d97c /test/Driver
parent2f03fe35c59af44e636a96225550cad5ddde5448 (diff)
downloadclang-8bfeeffa350e1e32d1b487cd414d673988bd148a.tar.gz
[ARM] Restructure cpu handling in the driver to mostly use the triple
Using the target cpu to determine some behaviour is sprinkled in several places in the driver, but in almost all the information that is needed can be found in the triple. Restructure things so that the triple is used, and the cpu is only used if the exact cpu name is needed. Also add a check that the -mcpu argument is valid, and correct the -march argument checking so that it handles -march=native correctly. I would have liked to move these checks into the computation of the triple, but the triple is calculated several times in several places and that would lead to multiple error messages for the same thing. Differential Revision: http://reviews.llvm.org/D9879 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@237894 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Driver')
-rw-r--r--test/Driver/arm-cortex-cpus.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/Driver/arm-cortex-cpus.c b/test/Driver/arm-cortex-cpus.c
index 6b76756d16..24b76f5e5a 100644
--- a/test/Driver/arm-cortex-cpus.c
+++ b/test/Driver/arm-cortex-cpus.c
@@ -205,6 +205,10 @@
// RUN: %clang -target arm---eabihf -march=armbogusv7 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BOGUS-HF %s
// CHECK-BOGUS-HF: error: the clang compiler does not support '-march=armbogusv7'
+// ================== Check that a bogus CPU gives an error
+// RUN: %clang -target arm -mcpu=bogus -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BOGUS-CPU %s
+// CHECK-BOGUS-CPU: error: the clang compiler does not support '-mcpu=bogus'
+
// ================== Check default Architecture on each ARM11 CPU
// RUN: %clang -target arm-linux-gnueabi -mcpu=arm1136j-s -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV6 %s
// RUN: %clang -target arm-linux-gnueabi -mcpu=arm1136jf-s -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV6 %s