[ADT] Implement llvm::bsearch() with std::partition_point()
authorFangrui Song <maskray@google.com>
Sun, 30 Jun 2019 09:17:59 +0000 (09:17 +0000)
committerFangrui Song <maskray@google.com>
Sun, 30 Jun 2019 09:17:59 +0000 (09:17 +0000)
commit2d2cb77e45d4c9ca34d05f80430e0f9404252980
tree8bc6fe45c7e019c198c1f454b5e73fec58eb703b
parent725a8a5dc43ff23640ca539b9b4c3f46bf549179
[ADT] Implement llvm::bsearch() with std::partition_point()

Summary:
Delete the begin-end form because the standard std::partition_point
can be easily used as a replacement.

The ranges-style llvm::bsearch will be renamed to llvm::partition_point
in the next clean-up patch.

The name "bsearch" doesn't meet people's expectation because in C:

> If two or more members compare equal, which member is returned is unspecified.

Reviewed By: sammccall

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

llvm-svn: 364719
clang-tools-extra/clangd/index/dex/PostingList.cpp
llvm/include/llvm/ADT/STLExtras.h
llvm/include/llvm/CodeGen/SlotIndexes.h
llvm/unittests/ADT/STLExtrasTest.cpp