[PATCH] D61758: [driver][xray] fix the macOS support checker by supporting -macos triple in addition to -darwin
Alex Lorenz via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu May 9 13:50:52 PDT 2019
arphaman created this revision.
arphaman added a reviewer: dberris.
Herald added subscribers: dexonsmith, jkorous.
Herald added a project: clang.
The previous check incorrectly checked for macOS support by allowing `-darwin` triples only, and `-macos` triple was not supported.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D61758
Files:
clang/lib/Driver/XRayArgs.cpp
clang/test/Driver/XRay/xray-instrument-macos.c
Index: clang/test/Driver/XRay/xray-instrument-macos.c
===================================================================
--- /dev/null
+++ clang/test/Driver/XRay/xray-instrument-macos.c
@@ -0,0 +1,4 @@
+// RUN: %clang -o /dev/null -v -fxray-instrument -target x86_64-apple-macos10.11 -c %s
+// RUN: %clang -o /dev/null -v -fxray-instrument -target x86_64-apple-darwin15 -c %s
+// REQUIRES-ANY: x86_64, x86_64h
+typedef int a;
Index: clang/lib/Driver/XRayArgs.cpp
===================================================================
--- clang/lib/Driver/XRayArgs.cpp
+++ clang/lib/Driver/XRayArgs.cpp
@@ -52,7 +52,7 @@
} else if (Triple.isOSFreeBSD() ||
Triple.isOSOpenBSD() ||
Triple.isOSNetBSD() ||
- Triple.getOS() == llvm::Triple::Darwin) {
+ Triple.isMacOSX()) {
if (Triple.getArch() != llvm::Triple::x86_64) {
D.Diag(diag::err_drv_clang_unsupported)
<< (std::string(XRayInstrumentOption) + " on " + Triple.str());
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61758.198897.patch
Type: text/x-patch
Size: 1013 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190509/a97a664e/attachment.bin>
More information about the cfe-commits
mailing list