[libcxx-commits] [PATCH] D119952: [libc++][AIX] Fix trivial_abi return tests for unique_ptr/weak_ptr
Jinsong Ji via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Feb 23 11:23:18 PST 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rG9bd9cbfa2f7b: [libc++][AIX] Fix trivial_abi return tests for unique_ptr/weak_ptr (authored by jsji).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119952/new/
https://reviews.llvm.org/D119952
Files:
libcxx/test/libcxx/memory/trivial_abi/unique_ptr_ret.pass.cpp
libcxx/test/libcxx/memory/trivial_abi/weak_ptr_ret.pass.cpp
Index: libcxx/test/libcxx/memory/trivial_abi/weak_ptr_ret.pass.cpp
===================================================================
--- libcxx/test/libcxx/memory/trivial_abi/weak_ptr_ret.pass.cpp
+++ libcxx/test/libcxx/memory/trivial_abi/weak_ptr_ret.pass.cpp
@@ -13,7 +13,6 @@
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ABI_ENABLE_SHARED_PTR_TRIVIAL_ABI
// XFAIL: gcc
-// XFAIL: LIBCXX-AIX-FIXME
#include <memory>
#include <cassert>
@@ -49,8 +48,9 @@
//
// With trivial_abi, local_addr is the address of a local variable in
// make_val, and hence different from &ret.
-#if !defined(__i386__) && !defined(__arm__) && !defined(_WIN32)
+#if !defined(__i386__) && !defined(__arm__) && !defined(_WIN32) && !defined(_AIX)
// On X86, structs are never returned in registers.
+ // On AIX, structs are never returned in registers.
// On ARM32, structs larger than 4 bytes cannot be returned in registers.
// On Windows, structs with a destructor are always returned indirectly.
// Thus, weak_ptr will be passed indirectly even if it is trivial.
Index: libcxx/test/libcxx/memory/trivial_abi/unique_ptr_ret.pass.cpp
===================================================================
--- libcxx/test/libcxx/memory/trivial_abi/unique_ptr_ret.pass.cpp
+++ libcxx/test/libcxx/memory/trivial_abi/unique_ptr_ret.pass.cpp
@@ -6,8 +6,6 @@
//
//===----------------------------------------------------------------------===//
-// XFAIL: LIBCXX-AIX-FIXME
-
// <memory>
// Test unique_ptr<T> with trivial_abi as return-type.
@@ -47,8 +45,9 @@
//
// With trivial_abi, local_addr is the address of a local variable in
// make_val, and hence different from &ret.
-#if !defined(__i386__) && !defined(_WIN32)
+#if !defined(__i386__) && !defined(_WIN32) && !defined(_AIX)
// On X86, structs are never returned in registers.
+ // On AIX, structs are never returned in registers.
// Thus, unique_ptr will be passed indirectly even if it is trivial.
// On Windows, structs with a destructor are always returned indirectly.
assert((void*)&ret != local_addr);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119952.410879.patch
Type: text/x-patch
Size: 2086 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220223/8fabcd98/attachment.bin>
More information about the libcxx-commits
mailing list