[all-commits] [llvm/llvm-project] d260ea: Inline basic_string::erase for fastpath where __n ...

Martijn Vels via All-commits all-commits at lists.llvm.org
Wed Feb 26 10:38:10 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: d260ea7199bce566fb4229eac5cc4c5d4843c5f0
      https://github.com/llvm/llvm-project/commit/d260ea7199bce566fb4229eac5cc4c5d4843c5f0
  Author: Martijn Vels <mvels at google.com>
  Date:   2020-02-26 (Wed, 26 Feb 2020)

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

  Log Message:
  -----------
  Inline basic_string::erase for fastpath where __n == npos

Summary:
This change checks for the case where people want to erase a string to the end, i.e., __n == npos, and inlines the call if so.

This also demonstrates keeping the ABI intact for V1, but inlining the erase() method for unstable.

Reviewers: EricWF, mclow.lists, ldionne

Reviewed By: EricWF, ldionne

Subscribers: smeenai, dexonsmith, christof, libcxx-commits

Tags: #libc

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




More information about the All-commits mailing list