[clang] 0428f2c - [SystemZ][XRay] Enable XRay for SystemZ in clang (#113254)

via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 5 13:02:23 PST 2024


Author: Kai Nacke
Date: 2024-11-05T16:02:20-05:00
New Revision: 0428f2cb5a91cc93897252c9dc4883efea3dbd9a

URL: https://github.com/llvm/llvm-project/commit/0428f2cb5a91cc93897252c9dc4883efea3dbd9a
DIFF: https://github.com/llvm/llvm-project/commit/0428f2cb5a91cc93897252c9dc4883efea3dbd9a.diff

LOG: [SystemZ][XRay] Enable XRay for SystemZ in clang (#113254)

With the support for xray for SystemZ in place, the option can now be
enabled in clang.

Added: 
    

Modified: 
    clang/lib/Driver/XRayArgs.cpp
    clang/test/Driver/XRay/xray-mode-flags.cpp

Removed: 
    


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