diff options
author | Eric Fiselier <eric@efcs.ca> | 2016-12-05 23:16:07 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2016-12-05 23:16:07 +0000 |
commit | daf21c3f69f14507d12f2350592171151d480758 (patch) | |
tree | 6fe6aed895bfda00ae237424caad7b963c1b555b /libcxx/test/std/experimental/utilities/tuple | |
parent | 800638fd67c05ca48317ef2ed28cefc5a685f0f3 (diff) | |
download | bcm5719-llvm-daf21c3f69f14507d12f2350592171151d480758.tar.gz bcm5719-llvm-daf21c3f69f14507d12f2350592171151d480758.zip |
Adjust libc++ test infastructure to fully support modules
This patch overhalls the libc++ test format/configuration in order to fully support modules. By "fully support" I mean get almost all of the tests passing. The main hurdle for doing this is handling tests that `#define _LIBCPP_FOO` macros to test a different configuration. This patch deals with these tests in the following ways:
1. For tests that define single `_LIBCPP_ABI_FOO` macros have been annotated with `// MODULES_DEFINES: _LIBCPP_ABI_FOO`. This allows the test suite to define the macro on the command line so it uses a different set of modules.
2. Tests for libc++'s debug mode (which define custom `_LIBCPP_ASSERT`) are automatically detected by the test suite and are compiled and run with modules disabled.
This patch also cleans up how the `CXXCompiler` helper class handles enabling/disabling language features.
NOTE: This patch uses `LIT` features which were only committed to LLVM today. If this patch breaks running the libc++ tests you probably need to update LLVM.
llvm-svn: 288728
Diffstat (limited to 'libcxx/test/std/experimental/utilities/tuple')
-rw-r--r-- | libcxx/test/std/experimental/utilities/tuple/tuple.apply/return_type.pass.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/libcxx/test/std/experimental/utilities/tuple/tuple.apply/return_type.pass.cpp b/libcxx/test/std/experimental/utilities/tuple/tuple.apply/return_type.pass.cpp index 314d2783f7e..01d36637e1c 100644 --- a/libcxx/test/std/experimental/utilities/tuple/tuple.apply/return_type.pass.cpp +++ b/libcxx/test/std/experimental/utilities/tuple/tuple.apply/return_type.pass.cpp @@ -20,32 +20,32 @@ static int my_int = 42; -template <int N> struct index {}; +template <int N> struct index_t {}; -void f(index<0>) {} +void f(index_t<0>) {} -int f(index<1>) { return 0; } +int f(index_t<1>) { return 0; } -int & f(index<2>) { return static_cast<int &>(my_int); } -int const & f(index<3>) { return static_cast<int const &>(my_int); } -int volatile & f(index<4>) { return static_cast<int volatile &>(my_int); } -int const volatile & f(index<5>) { return static_cast<int const volatile &>(my_int); } +int & f(index_t<2>) { return static_cast<int &>(my_int); } +int const & f(index_t<3>) { return static_cast<int const &>(my_int); } +int volatile & f(index_t<4>) { return static_cast<int volatile &>(my_int); } +int const volatile & f(index_t<5>) { return static_cast<int const volatile &>(my_int); } -int && f(index<6>) { return static_cast<int &&>(my_int); } -int const && f(index<7>) { return static_cast<int const &&>(my_int); } -int volatile && f(index<8>) { return static_cast<int volatile &&>(my_int); } -int const volatile && f(index<9>) { return static_cast<int const volatile &&>(my_int); } +int && f(index_t<6>) { return static_cast<int &&>(my_int); } +int const && f(index_t<7>) { return static_cast<int const &&>(my_int); } +int volatile && f(index_t<8>) { return static_cast<int volatile &&>(my_int); } +int const volatile && f(index_t<9>) { return static_cast<int const volatile &&>(my_int); } -int * f(index<10>) { return static_cast<int *>(&my_int); } -int const * f(index<11>) { return static_cast<int const *>(&my_int); } -int volatile * f(index<12>) { return static_cast<int volatile *>(&my_int); } -int const volatile * f(index<13>) { return static_cast<int const volatile *>(&my_int); } +int * f(index_t<10>) { return static_cast<int *>(&my_int); } +int const * f(index_t<11>) { return static_cast<int const *>(&my_int); } +int volatile * f(index_t<12>) { return static_cast<int volatile *>(&my_int); } +int const volatile * f(index_t<13>) { return static_cast<int const volatile *>(&my_int); } template <int Func, class Expect> void test() { - using F = decltype(f(index<Func>{})); + using F = decltype(f(index_t<Func>{})); static_assert(std::is_same<F, Expect>::value, ""); } |