diff --git a/clang/test/Driver/XRay/xray-ignore-loops-flags.cpp b/clang/test/Driver/XRay/xray-ignore-loops-flags.cpp index 2c6ddb8b52976..3dcd802af8c2c 100644 --- a/clang/test/Driver/XRay/xray-ignore-loops-flags.cpp +++ b/clang/test/Driver/XRay/xray-ignore-loops-flags.cpp @@ -2,8 +2,5 @@ // options include the -fxray-ignore-loops flag we provide in the // invocation. // -// RUN: %clang -fxray-instrument -fxray-ignore-loops -target x86_64-linux- -### \ -// RUN: -x c++ -emit-llvm -c -o - %s 2>&1 | FileCheck %s +// RUN: %clang -### -c --target=x86_64 -fxray-ignore-loops %s 2>&1 | FileCheck %s // CHECK: -fxray-ignore-loops -// -// REQUIRES: x86_64 || x86_64h diff --git a/clang/test/Driver/XRay/xray-instrumentation-bundles-flags.cpp b/clang/test/Driver/XRay/xray-instrumentation-bundles-flags.cpp index 4d311cc7d86c1..0139277c1e3e5 100644 --- a/clang/test/Driver/XRay/xray-instrumentation-bundles-flags.cpp +++ b/clang/test/Driver/XRay/xray-instrumentation-bundles-flags.cpp @@ -2,9 +2,5 @@ // options include the -fxray-instrumentation-bundle= flag we provide in the // invocation. // -// RUN: %clang -fxray-instrument -fxray-instrumentation-bundle=function -### \ -// RUN: -c -o - %s 2>&1 | FileCheck %s -// CHECK: -fxray-instrumentation-bundle=function -// -// REQUIRES: linux || freebsd -// REQUIRES: amd64 || x86_64 || x86_64h || arm || aarch64 || arm64 +// RUN: %clang -### -c --target=aarch64 -fxray-instrument -fxray-instrumentation-bundle=function %s 2>&1 | FileCheck %s +// CHECK: "-fxray-instrumentation-bundle=function" diff --git a/clang/test/Driver/XRay/xray-mode-flags.cpp b/clang/test/Driver/XRay/xray-mode-flags.cpp index e95053a4c684a..cfcf42f30e627 100644 --- a/clang/test/Driver/XRay/xray-mode-flags.cpp +++ b/clang/test/Driver/XRay/xray-mode-flags.cpp @@ -1,49 +1,31 @@ -// RUN: %clang -v -o /dev/null -fxray-instrument -fxray-modes=xray-fdr %s -### \ -// RUN: 2>&1 | FileCheck --check-prefix FDR %s -// RUN: %clang -v -o /dev/null -fxray-instrument -fxray-modes=xray-basic %s \ -// RUN: -### 2>&1 | FileCheck --check-prefix BASIC %s -// RUN: %clang -v -o /dev/null -fxray-instrument -fxray-modes=all -### %s \ -// RUN: 2>&1 | FileCheck --check-prefixes FDR,BASIC %s -// RUN: %clang -v -o /dev/null -fxray-instrument \ -// RUN: -fxray-modes=xray-fdr,xray-basic -### %s 2>&1 | \ -// RUN: FileCheck --check-prefixes FDR,BASIC %s -// RUN: %clang -v -o /dev/null -fxray-instrument \ -// RUN: -fxray-modes=xray-fdr -fxray-modes=xray-basic -### %s 2>&1 | \ -// RUN: FileCheck --check-prefixes FDR,BASIC %s -// RUN: %clang -v -o /dev/null -fxray-instrument -### %s \ -// RUN: 2>&1 | FileCheck --check-prefixes FDR,BASIC %s -// RUN: %clang -v -o /dev/null -fxray-instrument -fxray-modes=none -### %s \ -// RUN: 2>&1 | FileCheck --check-prefixes NONE %s +// RUN: %clang -### --target=x86_64-linux-gnu -fxray-instrument -fxray-modes=xray-fdr %s 2>&1 \ +// RUN: | FileCheck --check-prefix=FDR %s +// RUN: %clang -### --target=aarch64-linux-gnu -fxray-instrument -fxray-modes=xray-basic %s 2>&1 \ +// RUN: | FileCheck --check-prefix=BASIC %s +// RUN: %clang -### --target=aarch64-linux-gnu -fxray-instrument %s 2>&1 \ +// RUN: | FileCheck --check-prefixes=FDR,BASIC %s +// RUN: %clang -### --target=x86_64-linux-gnu -fxray-instrument -fxray-modes=all %s 2>&1 \ +// RUN: | FileCheck --check-prefixes=FDR,BASIC %s +// RUN: %clang -### --target=x86_64-linux-gnu -fxray-instrument -fxray-modes=xray-fdr,xray-basic %s 2>&1 \ +// RUN: | FileCheck --check-prefixes=FDR,BASIC %s +// RUN: %clang -### --target=x86_64-linux-gnu -fxray-instrument -fxray-modes=xray-fdr -fxray-modes=xray-basic %s 2>&1 \ +// RUN: | FileCheck --check-prefixes=FDR,BASIC %s +// RUN: %clang -### --target=x86_64-linux-gnu -fxray-instrument -fxray-modes=none %s 2>&1 \ +// RUN: | FileCheck --check-prefix=NONE %s // // We also should support overriding the modes in an additive manner. -// -// RUN: %clang -v -o /dev/null -fxray-instrument -fxray-modes=none,xray-fdr \ -// RUN: -### %s \ -// RUN: 2>&1 | FileCheck --check-prefixes FDR %s -// RUN: %clang -v -o /dev/null -fxray-instrument -fxray-modes=xray-fdr,none \ -// RUN: -### %s \ -// RUN: 2>&1 | FileCheck --check-prefixes NONE %s -// RUN: %clang -v -o /dev/null -fxray-instrument -fxray-modes=none,all \ -// RUN: -### %s \ -// RUN: 2>&1 | FileCheck --check-prefixes FDR,BASIC %s -// + +// RUN: %clang -### --target=x86_64-linux-gnu -fxray-instrument -fxray-modes=none,xray-fdr %s 2>&1 \ +// RUN: | FileCheck --check-prefix=FDR %s +// RUN: %clang -### --target=x86_64-linux-gnu -fxray-instrument -fxray-modes=all,none %s 2>&1 \ +// RUN: | FileCheck --check-prefix=NONE %s + // We also should support having the individual modes be concatenated. -// -// RUN: %clang -v -o /dev/null -fxray-instrument -fxray-modes=none \ -// RUN: -fxray-modes=xray-fdr \ -// RUN: -### %s \ -// RUN: 2>&1 | FileCheck --check-prefixes FDR %s -// -// Order also matters. -// -// RUN: %clang -v -o /dev/null -fxray-instrument -fxray-modes=xray-fdr \ -// RUN: -fxray-modes=none \ -// RUN: -### %s \ -// RUN: 2>&1 | FileCheck --check-prefixes NONE %s + +// RUN: %clang -### --target=x86_64-linux-gnu -fxray-instrument -fxray-modes=none -fxray-modes=xray-fdr %s 2>&1 \ +// RUN: | FileCheck --check-prefix=FDR %s // BASIC: libclang_rt.xray-basic // FDR: libclang_rt.xray-fdr // NONE-NOT: libclang_rt.xray-basic // NONE-NOT: libclang_rt.xray-fdr -// REQUIRES: linux || freebsd -// REQUIRES: amd64 || x86_64 || x86_64h || arm || aarch64 || arm64 diff --git a/clang/test/Driver/XRay/xray-nolinkdeps.cpp b/clang/test/Driver/XRay/xray-nolinkdeps.cpp index 0c42c1af4f926..3e6aab61673bd 100644 --- a/clang/test/Driver/XRay/xray-nolinkdeps.cpp +++ b/clang/test/Driver/XRay/xray-nolinkdeps.cpp @@ -2,5 +2,7 @@ // RUN: 2>&1 | FileCheck --check-prefix DISABLE %s // RUN: %clang -### --target=x86_64-unknown-linux-gnu -fxray-instrument %s \ // RUN: 2>&1 | FileCheck --check-prefix ENABLE %s +// RUN: %clang -### --target=x86_64-unknown-linux-gnu -shared -fxray-instrument %s \ +// RUN: 2>&1 | FileCheck --check-prefix DISABLE %s // ENABLE: "--whole-archive" "{{.*}}clang_rt.xray{{.*}}"--no-whole-archive" // DISABLE-NOT: clang_rt.xray diff --git a/clang/test/Driver/XRay/xray-shared-noxray.cpp b/clang/test/Driver/XRay/xray-shared-noxray.cpp deleted file mode 100644 index c279f93f3f3d8..0000000000000 --- a/clang/test/Driver/XRay/xray-shared-noxray.cpp +++ /dev/null @@ -1,16 +0,0 @@ -// RUN: %clangxx -shared -o /dev/null -v -fxray-instrument %s -### -// RUN: %clangxx -shared -o /dev/null -v -fxray-instrument %s -### 2>&1 | \ -// RUN: FileCheck %s --check-prefix=SHARED -// RUN: %clangxx -static -o /dev/null -v -fxray-instrument %s -### -DMAIN -// RUN: %clangxx -static -o /dev/null -v -fxray-instrument %s -### 2>&1 -DMAIN \ -// RUN: | FileCheck %s --check-prefix=STATIC -// -// SHARED-NOT: {{clang_rt\.xray-}} -// STATIC: {{clang_rt\.xray-}} -// -// REQUIRES: linux, enable_shared -int foo() { return 42; } - -#ifdef MAIN -int main() { return foo(); } -#endif