]> granicus.if.org Git - clang/commitdiff
[AArch64][v8.5A] Test clang option for the Memory Tagging Extension
authorOliver Stannard <oliver.stannard@arm.com>
Tue, 2 Oct 2018 09:38:59 +0000 (09:38 +0000)
committerOliver Stannard <oliver.stannard@arm.com>
Tue, 2 Oct 2018 09:38:59 +0000 (09:38 +0000)
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@343566 91177308-0d34-0410-b5e6-96231b3b80d8

test/Driver/aarch64-mte.c [new file with mode: 0644]

diff --git a/test/Driver/aarch64-mte.c b/test/Driver/aarch64-mte.c
new file mode 100644 (file)
index 0000000..89c9da9
--- /dev/null
@@ -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"