aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Curtis <mcurtis@codeaurora.org>2013-03-12 11:52:09 +0000
committerMatthew Curtis <mcurtis@codeaurora.org>2013-03-12 11:52:09 +0000
commite8a1efcafbea9a40fe12454d27baa30488475862 (patch)
treec815ba3a26e7fb1711a3aa18ca0f21b6db9bb21a
parent212d19a980a0ffaaff966546f67c20c2608ccbe1 (diff)
Remove driver support for Hexagon V2 and V3
Driver will now error when trying to compile for V2 or V3. Removal of V2 and V3 support will allow us to simplify the hexagon back-end. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176859 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Basic/Targets.cpp2
-rw-r--r--test/Driver/hexagon-toolchain.c16
2 files changed, 16 insertions, 2 deletions
diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp
index d148528749..b7cd3dce7c 100644
--- a/lib/Basic/Targets.cpp
+++ b/lib/Basic/Targets.cpp
@@ -3960,8 +3960,6 @@ public:
static const char *getHexagonCPUSuffix(StringRef Name) {
return llvm::StringSwitch<const char*>(Name)
- .Case("hexagonv2", "2")
- .Case("hexagonv3", "3")
.Case("hexagonv4", "4")
.Case("hexagonv5", "5")
.Default(0);
diff --git a/test/Driver/hexagon-toolchain.c b/test/Driver/hexagon-toolchain.c
index 53c034d888..bfa627c421 100644
--- a/test/Driver/hexagon-toolchain.c
+++ b/test/Driver/hexagon-toolchain.c
@@ -108,6 +108,22 @@
// CHECK010-NEXT: "{{.*}}/Inputs/hexagon_tree/qc/bin/../../gnu/bin/hexagon-as"{{.*}} "-march=v4"
// CHECK010-NEXT: "{{.*}}/Inputs/hexagon_tree/qc/bin/../../gnu/bin/hexagon-ld"{{.*}} "-mv4"
+// RUN: %clang -march=hexagonv2 -target hexagon-unknown-linux \
+// RUN: %s 2>&1 | FileCheck -check-prefix=CHECK-UNKNOWN-V2 %s
+// RUN: %clang -mcpu=hexagonv2 -target hexagon-unknown-linux \
+// RUN: %s 2>&1 | FileCheck -check-prefix=CHECK-UNKNOWN-V2 %s
+// RUN: %clang -mv2 -target hexagon-unknown-linux \
+// RUN: %s 2>&1 | FileCheck -check-prefix=CHECK-UNKNOWN-V2 %s
+// CHECK-UNKNOWN-V2: error: unknown target CPU 'hexagonv2'
+
+// RUN: %clang -march=hexagonv3 -target hexagon-unknown-linux \
+// RUN: %s 2>&1 | FileCheck -check-prefix=CHECK-UNKNOWN-V3 %s
+// RUN: %clang -mcpu=hexagonv3 -target hexagon-unknown-linux \
+// RUN: %s 2>&1 | FileCheck -check-prefix=CHECK-UNKNOWN-V3 %s
+// RUN: %clang -mv3 -target hexagon-unknown-linux \
+// RUN: %s 2>&1 | FileCheck -check-prefix=CHECK-UNKNOWN-V3 %s
+// CHECK-UNKNOWN-V3: error: unknown target CPU 'hexagonv3'
+
// -----------------------------------------------------------------------------
// Test Linker related args
// -----------------------------------------------------------------------------