[all-commits] [llvm/llvm-project] 9c0975: [libc++] Revert switch-based std::variant implemen...

Eric via All-commits all-commits at lists.llvm.org
Tue Nov 17 20:11:31 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 9c09757bca58a49d87f70584cff6f5bcb20f29b1
      https://github.com/llvm/llvm-project/commit/9c09757bca58a49d87f70584cff6f5bcb20f29b1
  Author: Eric Fiselier <eric at efcs.ca>
  Date:   2020-11-17 (Tue, 17 Nov 2020)

  Changed paths:
    M libcxx/include/variant
    M libcxx/test/std/utilities/variant/variant.hash/hash.pass.cpp
    M libcxx/test/std/utilities/variant/variant.relops/relops.pass.cpp
    M libcxx/test/std/utilities/variant/variant.relops/relops_bool_conv.fail.cpp
    M libcxx/test/std/utilities/variant/variant.variant/variant.dtor/dtor.pass.cpp
    M libcxx/test/std/utilities/variant/variant.variant/variant.status/index.pass.cpp
    M libcxx/test/std/utilities/variant/variant.variant/variant.status/valueless_by_exception.pass.cpp

  Log Message:
  -----------
  [libc++] Revert switch-based std::variant implementation again.

These changes cause substantial binary size increases for non-opt builds.
For example, the visit.pass.cpp test grows from 20k to 420k.

Further work will be done to re-land this patch without the size increases,
but that work is proving too tricky to fix forward.

This patch fully reverts:

* 35d226911165a9aae1f01f521a0019f1a9c0a25f

And it partially reverts:

* bb43a0cd4adc4f1fa12e0d2fd1fe9aa6b5c00e34

The latter of which added XFAIL's to new variant tests
because the new implementation needlessly makes non-throwing code
paths in variant invoke throwing code.

This means the reverted change also breaks source backwards compat
with code compiled on OS X targeting older system dylibs. There is no
need for this to be the case. We should fix it before recommitting.

Reviewed as:
https://reviews.llvm.org/D91662




More information about the All-commits mailing list