[libcxx] r292326 - Add support for running our test suite against MSVC's STL
Eric Fiselier via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 17 17:48:55 PST 2017
Author: ericwf
Date: Tue Jan 17 19:48:54 2017
New Revision: 292326
URL: http://llvm.org/viewvc/llvm-project?rev=292326&view=rev
Log:
Add support for running our test suite against MSVC's STL
Modified:
libcxx/trunk/test/libcxx/test/config.py
libcxx/trunk/test/std/thread/thread.mutex/thread.lock.algorithm/lock.pass.cpp
libcxx/trunk/test/support/MoveOnly.h
Modified: libcxx/trunk/test/libcxx/test/config.py
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/test/config.py?rev=292326&r1=292325&r2=292326&view=diff
==============================================================================
--- libcxx/trunk/test/libcxx/test/config.py (original)
+++ libcxx/trunk/test/libcxx/test/config.py Tue Jan 17 19:48:54 2017
@@ -274,7 +274,7 @@ class Configuration(object):
self.cxx_stdlib_under_test = self.get_lit_conf(
'cxx_stdlib_under_test', 'libc++')
if self.cxx_stdlib_under_test not in \
- ['libc++', 'libstdc++', 'cxx_default']:
+ ['libc++', 'libstdc++', 'msvc', 'cxx_default']:
self.lit_config.fatal(
'unsupported value for "cxx_stdlib_under_test": %s'
% self.cxx_stdlib_under_test)
@@ -609,6 +609,9 @@ class Configuration(object):
self.config.available_features.add('c++experimental')
self.cxx.link_flags += ['-lstdc++fs']
self.cxx.link_flags += ['-lm', '-pthread']
+ elif self.cxx_stdlib_under_test == 'msvc':
+ # FIXME: Correctly setup debug/release flags here.
+ pass
elif self.cxx_stdlib_under_test == 'cxx_default':
self.cxx.link_flags += ['-pthread']
else:
Modified: libcxx/trunk/test/std/thread/thread.mutex/thread.lock.algorithm/lock.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/thread.mutex/thread.lock.algorithm/lock.pass.cpp?rev=292326&r1=292325&r2=292326&view=diff
==============================================================================
--- libcxx/trunk/test/std/thread/thread.mutex/thread.lock.algorithm/lock.pass.cpp (original)
+++ libcxx/trunk/test/std/thread/thread.mutex/thread.lock.algorithm/lock.pass.cpp Tue Jan 17 19:48:54 2017
@@ -9,10 +9,10 @@
//
// UNSUPPORTED: libcpp-has-no-threads
-// This test hangs forever when built against libstdc++. In order to allow
+// This test hangs forever when built against libstdc++ and MSVC. In order to allow
// validation of the test suite against other STLs we have to mark it
// unsupported.
-// UNSUPPORTED: libstdc++
+// UNSUPPORTED: libstdc++, msvc
// <mutex>
Modified: libcxx/trunk/test/support/MoveOnly.h
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/support/MoveOnly.h?rev=292326&r1=292325&r2=292326&view=diff
==============================================================================
--- libcxx/trunk/test/support/MoveOnly.h (original)
+++ libcxx/trunk/test/support/MoveOnly.h Tue Jan 17 19:48:54 2017
@@ -41,8 +41,9 @@ namespace std {
template <>
struct hash<MoveOnly>
- : public std::unary_function<MoveOnly, std::size_t>
{
+ typedef MoveOnly argument_type;
+ typedef size_t result_type;
std::size_t operator()(const MoveOnly& x) const {return x.get();}
};
More information about the cfe-commits
mailing list