[llvm] [Attributor] Fix an issue that could potentially cause `AccessList` and `OffsetBins` out of sync (PR #106187)
Sameer Sahasrabuddhe via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 28 22:00:18 PDT 2024
================
@@ -294,11 +294,17 @@ struct RangeTy {
return *this;
}
- /// Comparison for sorting ranges by offset.
+ /// Comparison for sorting ranges.
///
- /// Returns true if the offset \p L is less than that of \p R.
- inline static bool OffsetLessThan(const RangeTy &L, const RangeTy &R) {
- return L.Offset < R.Offset;
+ /// Returns true if the offset of \p L is less than that of \p R. If the two
+ /// offsets are size, return true if the size of \p L is less than that of \p
----------------
ssahasra wrote:
```suggestion
/// offsets are same, compare the sizes instead.
```
https://github.com/llvm/llvm-project/pull/106187
More information about the llvm-commits
mailing list