This was originally motivated by a compile time problem I've since figured out how to solve differently, but the cleanup seemed useful. We had the same logic - which essentially implemented find - in several places. By commoning them out, I can implement find and allow erase to be inlined at the call sites if profitable.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
LGTM, minor formatting tweaks.
include/llvm/ADT/SmallPtrSet.h | ||
---|---|---|
197–198 ↗ | (On Diff #82739) | extraneous blank lines? |
include/llvm/ADT/SmallPtrSet.h | ||
---|---|---|
389 ↗ | (On Diff #82739) | endPtr is already in tree. This is almost "end()", but it can't be because of the breaking API check logic. Honestly, the breaking API check logic looks broken to me. :( It doesn't seem to cover anything other than begin/end, whereas we return other forms of iterators and might reasonable compare them against end. |
include/llvm/ADT/SmallPtrSet.h | ||
---|---|---|
389 ↗ | (On Diff #82739) | Yeah, this part looks fine. I was looking at a stale version of SmallPtrSet. |