[libcxx] Add logic to probe compiler in tests.
authorEric Fiselier <eric@efcs.ca>
Sat, 6 Dec 2014 21:13:15 +0000 (21:13 +0000)
committerEric Fiselier <eric@efcs.ca>
Sat, 6 Dec 2014 21:13:15 +0000 (21:13 +0000)
commitb92da3f21722caf378ff17fdb142f7c87092ad16
tree823045e98b37d62bdc58b2dd3c55c1aa7bae7f4a
parentb9f99739bcb26fa6883df668be873be1e205f926
[libcxx] Add logic to probe compiler in tests.

Summary:
This patch probes the cxx compiler used during testing by getting it to dump its predefined macros. Based on the value of these macros the compiler name and compiler name + version are added to the available features.

There are three compiler names:
- `clang`
- `apple-clang`
- `gcc`.

The available features added are equivalent to:
- `'%s' % compiler_name`
- `'%s-%s.%s' % compiler_name, major_version, minor_version`

This information can be used to XFAIL tests on different compilers / versions.

Reviewers: mclow.lists, danalbert, jroelofs

Reviewed By: jroelofs

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D6399

llvm-svn: 223593
libcxx/test/lit.cfg