[clang] [SystemZ][XRay] Enable XRay for SystemZ in clang (PR #113254)
Kai Nacke via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 5 12:48:22 PST 2024
https://github.com/redstar updated https://github.com/llvm/llvm-project/pull/113254
>From c8e629749e7cef1fff941729fe2b1b393c4f7ba5 Mon Sep 17 00:00:00 2001
From: Kai Nacke <kai.peter.nacke at ibm.com>
Date: Mon, 21 Oct 2024 22:39:57 -0400
Subject: [PATCH] [SystemZ][XRay] Enable XRay for SystemZ in clang
With the support for xray for SystemZ in place, the option can now
be enabled in clang.
---
clang/lib/Driver/XRayArgs.cpp | 1 +
clang/test/Driver/XRay/xray-mode-flags.cpp | 2 ++
2 files changed, 3 insertions(+)
diff --git a/clang/lib/Driver/XRayArgs.cpp b/clang/lib/Driver/XRayArgs.cpp
index d0bb5d4887c184..1cf31d10530a59 100644
--- a/clang/lib/Driver/XRayArgs.cpp
+++ b/clang/lib/Driver/XRayArgs.cpp
@@ -53,6 +53,7 @@ XRayArgs::XRayArgs(const ToolChain &TC, const ArgList &Args) {
case llvm::Triple::mipsel:
case llvm::Triple::mips64:
case llvm::Triple::mips64el:
+ case llvm::Triple::systemz:
break;
default:
D.Diag(diag::err_drv_unsupported_opt_for_target)
diff --git a/clang/test/Driver/XRay/xray-mode-flags.cpp b/clang/test/Driver/XRay/xray-mode-flags.cpp
index cfcf42f30e6271..d5f5ad248e2a15 100644
--- a/clang/test/Driver/XRay/xray-mode-flags.cpp
+++ b/clang/test/Driver/XRay/xray-mode-flags.cpp
@@ -4,6 +4,8 @@
// 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=s390x-linux-gnu -fxray-instrument -fxray-modes=xray-basic %s 2>&1 \
+// RUN: | FileCheck --check-prefix=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 \
More information about the cfe-commits
mailing list