diff options
| author | Dean Michael Berris <dberris@google.com> | 2016-10-27 04:56:14 +0000 |
|---|---|---|
| committer | Dean Michael Berris <dberris@google.com> | 2016-10-27 04:56:14 +0000 |
| commit | f469cb9045d1cd2b66e080462f472ba47d913d3f (patch) | |
| tree | 3e81defb0bb386ab799b3528be6e72275d0ad05e /clang/test/Driver | |
| parent | f8520559ce1be64c9f4f0abae7e5e1494341892d (diff) | |
| download | bcm5719-llvm-f469cb9045d1cd2b66e080462f472ba47d913d3f.tar.gz bcm5719-llvm-f469cb9045d1cd2b66e080462f472ba47d913d3f.zip | |
[XRay] Check in Clang whether XRay supports the target when -fxray-instrument is passed
Summary:
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.
Reviewers: rsmith, aaron.ballman, rnk, dberris
Differential Revision: https://reviews.llvm.org/D24799
llvm-svn: 285266
Diffstat (limited to 'clang/test/Driver')
| -rw-r--r-- | clang/test/Driver/XRay/lit.local.cfg | 2 | ||||
| -rw-r--r-- | clang/test/Driver/XRay/xray-instrument-cpu.c | 4 | ||||
| -rw-r--r-- | clang/test/Driver/XRay/xray-instrument-os.c | 4 |
3 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/Driver/XRay/lit.local.cfg b/clang/test/Driver/XRay/lit.local.cfg new file mode 100644 index 00000000000..34040d22615 --- /dev/null +++ b/clang/test/Driver/XRay/lit.local.cfg @@ -0,0 +1,2 @@ +target_triple_components = config.target_triple.split('-') +config.available_features.update(target_triple_components) diff --git a/clang/test/Driver/XRay/xray-instrument-cpu.c b/clang/test/Driver/XRay/xray-instrument-cpu.c new file mode 100644 index 00000000000..377459aab94 --- /dev/null +++ b/clang/test/Driver/XRay/xray-instrument-cpu.c @@ -0,0 +1,4 @@ +// RUN: not %clang -v -fxray-instrument -c %s +// XFAIL: amd64-, x86_64-, x86_64h-, arm +// REQUIRES: linux +typedef int a; diff --git a/clang/test/Driver/XRay/xray-instrument-os.c b/clang/test/Driver/XRay/xray-instrument-os.c new file mode 100644 index 00000000000..0802d28d300 --- /dev/null +++ b/clang/test/Driver/XRay/xray-instrument-os.c @@ -0,0 +1,4 @@ +// RUN: not %clang -v -fxray-instrument -c %s +// XFAIL: -linux- +// REQUIRES-ANY: amd64, x86_64, x86_64h, arm +typedef int a; |

