summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Stannard <oliver.stannard@arm.com>2018-10-02 09:38:59 +0000
committerOliver Stannard <oliver.stannard@arm.com>2018-10-02 09:38:59 +0000
commitf44f4035254aab992f4bf275688240ef18eefe9a (patch)
tree9154855a399a3e93ccae3ab69ed3ccb51eb77d35
parent2069368cf6c3c47751854520a0a2b29a3e1e4d58 (diff)
[AArch64][v8.5A] Test clang option for the Memory Tagging Extension
The implementation of this is in TargetParser, so we only need to add a test for it in clang. Patch by Pablo Barrio! Differential revision: https://reviews.llvm.org/D52493
-rw-r--r--clang/test/Driver/aarch64-mte.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/test/Driver/aarch64-mte.c b/clang/test/Driver/aarch64-mte.c
new file mode 100644
index 00000000000..89c9da9e70a
--- /dev/null
+++ b/clang/test/Driver/aarch64-mte.c
@@ -0,0 +1,13 @@
+// RUN: %clang -### -target aarch64-none-none-eabi -march=armv8.4a+memtag %s 2>&1 | FileCheck %s
+// RUN: %clang -### -target aarch64-none-none-eabi -march=armv8.5a+memtag %s 2>&1 | FileCheck %s
+// CHECK: "-target-feature" "+mte"
+
+// RUN: %clang -### -target aarch64-none-none-eabi -march=armv8.4a+nomemtag %s 2>&1 | FileCheck %s --check-prefix=NOMTE
+// RUN: %clang -### -target aarch64-none-none-eabi -march=armv8.5a+nomemtag %s 2>&1 | FileCheck %s --check-prefix=NOMTE
+// NOMTE: "-target-feature" "-mte"
+
+// RUN: %clang -### -target aarch64-none-none-eabi %s 2>&1 | FileCheck %s --check-prefix=ABSENTMTE
+// RUN: %clang -### -target aarch64-none-none-eabi -march=armv8.4a %s 2>&1 | FileCheck %s --check-prefix=ABSENTMTE
+// RUN: %clang -### -target aarch64-none-none-eabi -march=armv8.5a %s 2>&1 | FileCheck %s --check-prefix=ABSENTMTE
+// ABSENTMTE-NOT: "-target-feature" "+mte"
+// ABSENTMTE-NOT: "-target-feature" "-mte"