[all-commits] [llvm/llvm-project] 6ab320: Remove the unnecessary `is_nothrow_swappable` cond...
Michael Park via All-commits
all-commits at lists.llvm.org
Wed Jul 8 10:47:23 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 6ab3208d779ffb3b32744b0190d7035d4b369173
https://github.com/llvm/llvm-project/commit/6ab3208d779ffb3b32744b0190d7035d4b369173
Author: Michael Park <mcypark at gmail.com>
Date: 2020-07-08 (Wed, 08 Jul 2020)
Changed paths:
M libcxx/include/variant
Log Message:
-----------
Remove the unnecessary `is_nothrow_swappable` condition in `swap`.
Thanks to @lewissbaker who pointed out the unnecessary condition in
https://reviews.llvm.org/D81954#inline-756872. Since this codepath does not
make use of `swap` anyway (that codepath is a different branch), we can safely
remove this condition and produce better codegen when all types are nothrow
movable but are potentially-throwing swappable.
See codegen in https://gcc.godbolt.org/z/uDFZjz
Reviewed By: ldionne, #libc
Differential Revision: https://reviews.llvm.org/D83274
More information about the All-commits
mailing list