[all-commits] [llvm/llvm-project] 9bd9cb: [libc++][AIX] Fix trivial_abi return tests for uni...

jsji via All-commits all-commits at lists.llvm.org
Wed Feb 23 11:23:12 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9bd9cbfa2f7b60ddb95cb321eaf2a4804aeef611
      https://github.com/llvm/llvm-project/commit/9bd9cbfa2f7b60ddb95cb321eaf2a4804aeef611
  Author: Jinsong Ji <jji at us.ibm.com>
  Date:   2022-02-23 (Wed, 23 Feb 2022)

  Changed paths:
    M libcxx/test/libcxx/memory/trivial_abi/unique_ptr_ret.pass.cpp
    M libcxx/test/libcxx/memory/trivial_abi/weak_ptr_ret.pass.cpp

  Log Message:
  -----------
  [libc++][AIX] Fix trivial_abi return tests for unique_ptr/weak_ptr

The unique_ptr_ret and weak_ptr_ret tests are not expected to pass on
AIX. These tests check that unique_ptr and weak_ptr are returned by
value, but on AIX, all structs are always returned by reference.

```
3.9.6 Function Return Values
...

Note: Structures of any length and character strings longer than four
bytes are returned in a storage buffer allocated by the caller. The
address of this buffer is passed as a hidden first argument in GPR3,
which causes the first explicit argument word to be passed in GPR4. This
hidden argument is treated as a formal argument and corresponds to the
first word of the argument area.
```

Reviewed By: #powerpc, daltenty, #libc, Quuxplusone, philnik

Differential Revision: https://reviews.llvm.org/D119952




More information about the All-commits mailing list