Index: cfe/trunk/lib/Driver/XRayArgs.cpp =================================================================== --- cfe/trunk/lib/Driver/XRayArgs.cpp +++ cfe/trunk/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()); Index: cfe/trunk/test/Driver/XRay/xray-instrument-macos.c =================================================================== --- cfe/trunk/test/Driver/XRay/xray-instrument-macos.c +++ cfe/trunk/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;