[all-commits] [llvm/llvm-project] 0e9979: [libc++][format][1/6] Reduce binary size.

mordante via All-commits all-commits at lists.llvm.org
Wed Dec 1 08:50:30 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0e9979affe2941b25df61c1219ba9ed64f4fbf6c
      https://github.com/llvm/llvm-project/commit/0e9979affe2941b25df61c1219ba9ed64f4fbf6c
  Author: Mark de Wever <koraq at xs4all.nl>
  Date:   2021-12-01 (Wed, 01 Dec 2021)

  Changed paths:
    M libcxx/docs/Status/Cxx20Papers.csv
    M libcxx/include/format
    M libcxx/include/version
    M libcxx/test/std/language.support/support.limits/support.limits.general/format.version.pass.cpp
    M libcxx/test/std/language.support/support.limits/support.limits.general/version.version.pass.cpp
    M libcxx/test/std/utilities/format/format.arguments/format.arg.store/make_format_args.sh.cpp
    M libcxx/test/std/utilities/format/format.arguments/format.args/types.compile.pass.cpp
    M libcxx/test/std/utilities/format/format.functions/format_tests.h
    M libcxx/test/std/utilities/format/format.functions/locale-specific_form.pass.cpp
    M libcxx/test/std/utilities/format/format.functions/vformat.locale.pass.cpp
    M libcxx/test/std/utilities/format/format.functions/vformat.pass.cpp
    M libcxx/test/std/utilities/format/format.functions/vformat_to.locale.pass.cpp
    M libcxx/test/std/utilities/format/format.functions/vformat_to.pass.cpp
    M libcxx/utils/generate_feature_test_macro_components.py

  Log Message:
  -----------
  [libc++][format][1/6] Reduce binary size.

This removes the `format_args_t` from `<format>` and adjusts the type of
the `format_args` for the `vformat_to` overloads.

The `format_context` uses a `back_insert_iterator<string>` therefore the
new `output_iterator` function uses a `string` as its temporary storage
buffer. This isn't ideal. The next patches in this series will improve
this. These improvements make it easy to also improve `format_to_n` and
`formatted_size`.

This addresses P2216 `6. Binary size`.
P2216 `5. Compile-time checks` are not part of this change.

Implements parts of:
- P2216 std::format improvements

Depends on D103670

Reviewed By: ldionne, #libc

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




More information about the All-commits mailing list