Skip to content

Commit ab09289

Browse files
amy-kwantru
authored andcommitted
[libcxx] [test] Fix max_size.pass.cpp for PowerPC targets
This patch fixes the max_size.pass.cpp test for PowerPC targets, depending on endianness. We will exhibit the full_size() behaviour for little endian (where __endian_factor = 2 ), and the half_size() behaviour for big endian (where __endian_factor = 1). Differential Revision: https://reviews.llvm.org/D131682 (cherry picked from commit e2e9e2c)
1 parent 6ce4369 commit ab09289

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

libcxx/test/libcxx/strings/basic.string/string.capacity/max_size.pass.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,13 @@ bool test() {
7474
# else
7575
full_size();
7676
# endif
77-
# elif defined(__powerpc__) || defined(__powerpc64__) || defined(__sparc64__)
77+
# elif defined(__powerpc__) || defined(__powerpc64__)
78+
# ifdef __BIG_ENDIAN__
79+
half_size();
80+
# else
81+
full_size();
82+
# endif
83+
# elif defined(__sparc64__)
7884
half_size();
7985
# elif defined(_WIN32)
8086
full_size();

0 commit comments

Comments
 (0)