[PATCH] D26415: [XRay] Support AArch64 in Clang

Serge Rogatch via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 8 12:31:41 PST 2016


rSerge created this revision.
rSerge added reviewers: dberris, rengolin.
rSerge added subscribers: iid_iunknown, cfe-commits.
Herald added a subscriber: aemerson.

This patch adds XRay support in Clang for AArch64 target.


https://reviews.llvm.org/D26415

Files:
  lib/Driver/Tools.cpp
  test/Driver/XRay/xray-instrument-cpu.c
  test/Driver/XRay/xray-instrument-os.c


Index: test/Driver/XRay/xray-instrument-os.c
===================================================================
--- test/Driver/XRay/xray-instrument-os.c
+++ test/Driver/XRay/xray-instrument-os.c
@@ -1,4 +1,4 @@
 // RUN: not %clang -o /dev/null -v -fxray-instrument -c %s
 // XFAIL: -linux-
-// REQUIRES-ANY: amd64, x86_64, x86_64h, arm
+// REQUIRES-ANY: amd64, x86_64, x86_64h, arm, aarch64, arm64
 typedef int a;
Index: test/Driver/XRay/xray-instrument-cpu.c
===================================================================
--- test/Driver/XRay/xray-instrument-cpu.c
+++ test/Driver/XRay/xray-instrument-cpu.c
@@ -1,4 +1,4 @@
 // RUN: not %clang -o /dev/null -v -fxray-instrument -c %s
-// XFAIL: amd64-, x86_64-, x86_64h-, arm
+// XFAIL: amd64-, x86_64-, x86_64h-, arm, aarch64, arm64
 // REQUIRES: linux
 typedef int a;
Index: lib/Driver/Tools.cpp
===================================================================
--- lib/Driver/Tools.cpp
+++ lib/Driver/Tools.cpp
@@ -4902,7 +4902,8 @@
     const char *const XRayInstrumentOption = "-fxray-instrument";
     if (Triple.getOS() == llvm::Triple::Linux &&
         (Triple.getArch() == llvm::Triple::arm ||
-         Triple.getArch() == llvm::Triple::x86_64)) {
+         Triple.getArch() == llvm::Triple::x86_64 ||
+         Triple.getArch() == llvm::Triple::aarch64)) {
       // Supported.
     } else {
       D.Diag(diag::err_drv_clang_unsupported)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26415.77239.patch
Type: text/x-patch
Size: 1430 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161108/230e2076/attachment-0001.bin>


More information about the cfe-commits mailing list