[libcxx] [test] Move the is_<platform> functions down to subclasses
authorMartin Storsjö <martin@martin.st>
Fri, 5 Mar 2021 15:27:55 +0000 (17:27 +0200)
committerMartin Storsjö <martin@martin.st>
Sat, 6 Mar 2021 06:52:34 +0000 (08:52 +0200)
commit714644a36c3095e1dffeb2fb42da3876a5919d21
tree0c955fa3ceed84d19187c16fe0ef7b8b8b612656
parentebe6d3be0f73c15e64b1ebafd2a4b9fa836be78c
[libcxx] [test] Move the is_<platform> functions down to subclasses

If cross testing (and manually specifying a LIBCXX_TARGET_INFO in the
cmake configuration, as the default is to match the build platform),
we want the accessors for querying the target platform, is_windows,
is_darwin, to return the right value depending on which target info
class is used, not based on what platform is running the build and
driving the tests.

When LIBCXX_TARGET_INFO isn't defined, the right target info class
is chosen automatically based on the platform one is running on, so
this shouldn't make any practical difference for such setups.

Differential Revision: https://reviews.llvm.org/D98045
libcxx/utils/libcxx/test/target_info.py