[llvm] [ADT] Use llvm::partition_point (NFC) (PR #137495)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 26 22:30:35 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-adt
Author: Kazu Hirata (kazutakahirata)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/137495.diff
1 Files Affected:
- (modified) llvm/include/llvm/ADT/AddressRanges.h (+6-8)
``````````diff
diff --git a/llvm/include/llvm/ADT/AddressRanges.h b/llvm/include/llvm/ADT/AddressRanges.h
index 299b89c18b7e9..79ba5d5a3eddb 100644
--- a/llvm/include/llvm/ADT/AddressRanges.h
+++ b/llvm/include/llvm/ADT/AddressRanges.h
@@ -97,10 +97,8 @@ template <typename T> class AddressRangesBase {
if (Start >= End)
return Ranges.end();
- auto It =
- std::partition_point(Ranges.begin(), Ranges.end(), [=](const T &R) {
- return AddressRange(R).start() <= Start;
- });
+ auto It = llvm::partition_point(
+ Ranges, [=](const T &R) { return AddressRange(R).start() <= Start; });
if (It == Ranges.begin())
return Ranges.end();
@@ -169,10 +167,10 @@ class AddressRangesMap : public AddressRangesBase<AddressRangeValuePair> {
return;
// Search for range which is less than or equal incoming Range.
- auto It = std::partition_point(Ranges.begin(), Ranges.end(),
- [=](const AddressRangeValuePair &R) {
- return R.Range.start() <= Range.start();
- });
+ auto It =
+ llvm::partition_point(Ranges, [=](const AddressRangeValuePair &R) {
+ return R.Range.start() <= Range.start();
+ });
if (It != Ranges.begin())
It--;
``````````
</details>
https://github.com/llvm/llvm-project/pull/137495
More information about the llvm-commits
mailing list