r344742 - [X86][Tests] Make sure tls-direct-seg-refs tests only run where supported

Kristina Brooks via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 18 07:44:25 PDT 2018


Author: kristina
Date: Thu Oct 18 07:44:25 2018
New Revision: 344742

URL: http://llvm.org/viewvc/llvm-project?rev=344742&view=rev
Log:
[X86][Tests] Make sure tls-direct-seg-refs tests only run where supported

This flag is only supported for x86 targets, make sure the tests only run
for those.


Modified:
    cfe/trunk/test/CodeGen/indirect-tls-seg-refs.c
    cfe/trunk/test/Driver/indirect-tls-seg-refs.c

Modified: cfe/trunk/test/CodeGen/indirect-tls-seg-refs.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/indirect-tls-seg-refs.c?rev=344742&r1=344741&r2=344742&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/indirect-tls-seg-refs.c (original)
+++ cfe/trunk/test/CodeGen/indirect-tls-seg-refs.c Thu Oct 18 07:44:25 2018
@@ -1,5 +1,7 @@
-// RUN: %clang_cc1 %s -emit-llvm -o - -mno-tls-direct-seg-refs | FileCheck %s -check-prefix=NO-TLSDIRECT
-// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s -check-prefix=TLSDIRECT
+// REQUIRES: x86-registered-target
+
+// RUN: %clang_cc1 %s -emit-llvm -triple x86_64-unknown-linux -o - -mno-tls-direct-seg-refs | FileCheck %s -check-prefix=NO-TLSDIRECT
+// RUN: %clang_cc1 %s -emit-llvm -triple x86_64-unknown-linux -o - | FileCheck %s -check-prefix=TLSDIRECT
 
 // NO-TLSDIRECT: attributes #{{[0-9]+}} = {{{.*}} "indirect-tls-seg-refs"
 // TLSDIRECT-NOT: attributes #{{[0-9]+}} = {{{.*}} "indirect-tls-seg-refs"

Modified: cfe/trunk/test/Driver/indirect-tls-seg-refs.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/indirect-tls-seg-refs.c?rev=344742&r1=344741&r2=344742&view=diff
==============================================================================
--- cfe/trunk/test/Driver/indirect-tls-seg-refs.c (original)
+++ cfe/trunk/test/Driver/indirect-tls-seg-refs.c Thu Oct 18 07:44:25 2018
@@ -1,7 +1,8 @@
-// RUN: %clang -### %s 2>&1 | FileCheck %s -check-prefix=TLSDIRECT
-// RUN: %clang -### -mno-tls-direct-seg-refs -mtls-direct-seg-refs %s 2>&1 | FileCheck %s -check-prefix=TLSDIRECT
-// RUN: %clang -### -mtls-direct-seg-refs -mno-tls-direct-seg-refs %s 2>&1 | FileCheck %s -check-prefix=NO-TLSDIRECT
-// REQUIRES: clang-driver
+// REQUIRES: clang-driver, x86-registered-target
+
+// RUN: %clang -### -target x86_64-unknown-linux %s 2>&1 | FileCheck %s -check-prefix=TLSDIRECT
+// RUN: %clang -### -target x86_64-unknown-linux -mno-tls-direct-seg-refs -mtls-direct-seg-refs %s 2>&1 | FileCheck %s -check-prefix=TLSDIRECT
+// RUN: %clang -### -target x86_64-unknown-linux -mtls-direct-seg-refs -mno-tls-direct-seg-refs %s 2>&1 | FileCheck %s -check-prefix=NO-TLSDIRECT
 
 // NO-TLSDIRECT: -mno-tls-direct-seg-refs
 // TLSDIRECT-NOT: -mno-tls-direct-seg-refs




More information about the cfe-commits mailing list