commit | d637f07d28682b4157f1248a685f18be9dba06f6 | [log] [tgz] |
---|---|---|
author | Louis Dionne <ldionne.2@gmail.com> | Thu Mar 24 09:27:03 2022 -0400 |
committer | Copybara-Service <copybara-worker@google.com> | Tue Mar 29 08:51:08 2022 -0700 |
tree | 0c0389c0746e72a8720dc46300da13c491f94b8f | |
parent | 0ef91e858dacbf2d3ca3efcd583626e770982914 [diff] |
[libc++] Use __builtin_expect and __builtin_assume in _LIBCPP_ASSERT Since we expect the condition to be true most of the time, we might as well tell the compiler. And when assertions are disabled, we might as well tell the compiler that it's allowed to assume that the condition holds. Differential Revision: https://reviews.llvm.org/D122397 GitOrigin-RevId: f0799465b2cc25738d7164774926a8ba3a63b98d