[XRay] Check in Clang whether XRay supports the target when -fxray-instrument is...
authorDean Michael Berris <dberris@google.com>
Tue, 4 Oct 2016 08:22:47 +0000 (08:22 +0000)
committerDean Michael Berris <dberris@google.com>
Tue, 4 Oct 2016 08:22:47 +0000 (08:22 +0000)
commit5db9121b31a1935fa1fa53cf3b308ea6849ea965
tree8d4d785a134a18ea0ccce4ce32e3f1daa26dd2f1
parent535529b41c9d1a1b52ee755008018f27a0bb4fec
[XRay] Check in Clang whether XRay supports the target when -fxray-instrument is passed

Added the code which explicitly emits an error in Clang in case
`-fxray-instrument` is passed, but XRay is not supported for the
selected target.

Author: rSerge

Reviewers: dberris, rsmith, aaron.ballman, rnk

Subscribers: cfe-commits, iid_iunknown

Differential Revision: https://reviews.llvm.org/D24799

llvm-svn: 283193
clang/lib/Driver/Tools.cpp
clang/test/Driver/xray-instrument.c [new file with mode: 0644]