[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.

llvm-svn: 344742
This commit is contained in:
Kristina Brooks 2018-10-18 14:44:25 +00:00
parent 3d0adbe636
commit a1e6e65b9f
2 changed files with 9 additions and 6 deletions

View File

@ -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"

View File

@ -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