[all-commits] [llvm/llvm-project] 60f7bd: [libc++][AIX] Make basic_string layout compatible ...

xingxue-ibm via All-commits all-commits at lists.llvm.org
Fri Jun 24 14:26:42 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 60f7bdfd0317cb38eda54637cdab9baed8ae2f57
      https://github.com/llvm/llvm-project/commit/60f7bdfd0317cb38eda54637cdab9baed8ae2f57
  Author: Xing Xue <xingxue at outlook.com>
  Date:   2022-06-24 (Fri, 24 Jun 2022)

  Changed paths:
    M libcxx/include/__config
    M libcxx/include/string

  Log Message:
  -----------
  [libc++][AIX] Make basic_string layout compatible with earlier version

Summary:
Patch D123580 changed to use bit fields for strings in long and short mode. As a result, this changes the layout of these strings on AIX because bit fields on AIX are 4 bytes, which breaks the ABI compatibility with earlier strings before the change on AIX. This patch uses the attribute 'packed' and anonymous structure to make string layout compatible. This patch will also make test cases alignof.compile.pass.cpp and sizeof.compile.pass.cpp introduced in D127672 pass on AIX.

Reviewed by: philnik, Mordante, hubert.reinterpretcast, libc++

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




More information about the All-commits mailing list