[clang] [SystemZ][XRay] Enable XRay for SystemZ in clang (PR #113254)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 21 19:45:59 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-systemz
Author: Kai Nacke (redstar)
<details>
<summary>Changes</summary>
With the support for xray for SystemZ in place, the option can now be enabled in clang.
---
Full diff: https://github.com/llvm/llvm-project/pull/113254.diff
2 Files Affected:
- (modified) clang/lib/Driver/XRayArgs.cpp (+1)
- (modified) clang/test/Driver/XRay/xray-mode-flags.cpp (+2)
``````````diff
diff --git a/clang/lib/Driver/XRayArgs.cpp b/clang/lib/Driver/XRayArgs.cpp
index 8c5134e2501358..f0c9c4b912dcf1 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 \
``````````
</details>
https://github.com/llvm/llvm-project/pull/113254
More information about the cfe-commits
mailing list