[all-commits] [llvm/llvm-project] 0cc34c: [libc++] Define legacy symbols for inline function...

Louis Dionne via All-commits all-commits at lists.llvm.org
Tue Apr 12 10:44:45 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0cc34ca7ecfc9d0efee322f60ed6c3169f4f70ca
      https://github.com/llvm/llvm-project/commit/0cc34ca7ecfc9d0efee322f60ed6c3169f4f70ca
  Author: Louis Dionne <ldionne.2 at gmail.com>
  Date:   2022-04-12 (Tue, 12 Apr 2022)

  Changed paths:
    M libcxx/include/__memory/shared_ptr.h
    M libcxx/include/system_error
    M libcxx/src/memory.cpp
    M libcxx/src/system_error.cpp

  Log Message:
  -----------
  [libc++] Define legacy symbols for inline functions at a finer-grained level

When we build the library with the stable ABI, we need to include some
functions in the dylib that were made inline in later versions of the
library (to avoid breaking code that might be relying on those symbols).

However, those methods were made non-inline whenever we'd be building
the library, which means that all translation units would end up using
the old out-of-line definition of these methods, as opposed to the new
inlined version. This patch makes it so that only the translation units
that actually define the out-of-line methods use the old definition,
opening up potential optimization opportunities in other translation
units.

This should solve some of the issues encountered in D65667.

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




More information about the All-commits mailing list