From: Kristina Brooks Date: Thu, 18 Oct 2018 14:44:25 +0000 (+0000) Subject: [X86][Tests] Make sure tls-direct-seg-refs tests only run where supported X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=972f7e6fe5e2c6fdd583f90f149c87de11676c5f;p=clang [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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@344742 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/CodeGen/indirect-tls-seg-refs.c b/test/CodeGen/indirect-tls-seg-refs.c index 26806801ad..de6f3cda7d 100644 --- a/test/CodeGen/indirect-tls-seg-refs.c +++ b/test/CodeGen/indirect-tls-seg-refs.c @@ -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" diff --git a/test/Driver/indirect-tls-seg-refs.c b/test/Driver/indirect-tls-seg-refs.c index e15e874693..b3f6932985 100644 --- a/test/Driver/indirect-tls-seg-refs.c +++ b/test/Driver/indirect-tls-seg-refs.c @@ -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