[libcxx] r215769 - Tame a few enum size tests when using -fshort-enums on ARM.

Jonathan Roelofs jonathan at codesourcery.com
Fri Aug 15 14:34:53 PDT 2014


Author: jroelofs
Date: Fri Aug 15 16:34:52 2014
New Revision: 215769

URL: http://llvm.org/viewvc/llvm-project?rev=215769&view=rev
Log:
Tame a few enum size tests when using -fshort-enums on ARM.

Modified:
    libcxx/trunk/test/utilities/meta/meta.trans/meta.trans.sign/make_signed.pass.cpp
    libcxx/trunk/test/utilities/meta/meta.trans/meta.trans.sign/make_unsigned.pass.cpp

Modified: libcxx/trunk/test/utilities/meta/meta.trans/meta.trans.sign/make_signed.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/utilities/meta/meta.trans/meta.trans.sign/make_signed.pass.cpp?rev=215769&r1=215768&r2=215769&view=diff
==============================================================================
--- libcxx/trunk/test/utilities/meta/meta.trans/meta.trans.sign/make_signed.pass.cpp (original)
+++ libcxx/trunk/test/utilities/meta/meta.trans/meta.trans.sign/make_signed.pass.cpp Fri Aug 15 16:34:52 2014
@@ -52,7 +52,7 @@ int main()
     test_make_signed< unsigned long long, signed long long >();
     test_make_signed< wchar_t, std::conditional<sizeof(wchar_t) == 4, int, short>::type >();
     test_make_signed< const wchar_t, std::conditional<sizeof(wchar_t) == 4, const int, const short>::type >();
-    test_make_signed< const Enum, const int >();
+    test_make_signed< const Enum, std::conditional<sizeof(Enum) == sizeof(int), const int, const signed char>::type >();
     test_make_signed< BigEnum, std::conditional<sizeof(long) == 4, long long, long>::type >();
 #ifndef _LIBCPP_HAS_NO_INT128
     test_make_signed< __int128_t, __int128_t >();

Modified: libcxx/trunk/test/utilities/meta/meta.trans/meta.trans.sign/make_unsigned.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/utilities/meta/meta.trans/meta.trans.sign/make_unsigned.pass.cpp?rev=215769&r1=215768&r2=215769&view=diff
==============================================================================
--- libcxx/trunk/test/utilities/meta/meta.trans/meta.trans.sign/make_unsigned.pass.cpp (original)
+++ libcxx/trunk/test/utilities/meta/meta.trans/meta.trans.sign/make_unsigned.pass.cpp Fri Aug 15 16:34:52 2014
@@ -52,7 +52,7 @@ int main()
     test_make_unsigned<unsigned long long, unsigned long long> ();
     test_make_unsigned<wchar_t, std::conditional<sizeof(wchar_t) == 4, unsigned int, unsigned short>::type> ();
     test_make_unsigned<const wchar_t, std::conditional<sizeof(wchar_t) == 4, const unsigned int, const unsigned short>::type> ();
-    test_make_unsigned<const Enum, const unsigned int> ();
+    test_make_unsigned<const Enum, std::conditional<sizeof(Enum) == sizeof(int), const unsigned int, const unsigned char>::type >();
     test_make_unsigned<BigEnum,
                    std::conditional<sizeof(long) == 4, unsigned long long, unsigned long>::type> ();
 #ifndef _LIBCPP_HAS_NO_INT128





More information about the cfe-commits mailing list