[libcxx-commits] [PATCH] D105906: [libcxx] [test] Clarify weak_ptr_ret on Windows, remove a LIBCXX-WINDOWS-FIXME

Martin Storsjö via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jul 13 11:17:20 PDT 2021


mstorsjo updated this revision to Diff 358361.
mstorsjo added a comment.

Rebase past CI config changes


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D105906/new/

https://reviews.llvm.org/D105906

Files:
  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
@@ -15,8 +15,6 @@
 // There were assertion failures in both parse and codegen, which are fixed in clang 11.
 // UNSUPPORTED: gcc, clang-4, clang-5, clang-6, clang-7, clang-8, clang-9, clang-10
 
-// XFAIL: LIBCXX-WINDOWS-FIXME
-
 #include <memory>
 #include <cassert>
 
@@ -51,9 +49,10 @@
   //
   // 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__)
+#if !defined(__i386__) && !defined(__arm__) && !defined(_WIN32)
   // On X86, 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.
   assert((void*)&ret != local_addr);
 #endif


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105906.358361.patch
Type: text/x-patch
Size: 1112 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210713/72a2d63b/attachment.bin>


More information about the libcxx-commits mailing list