commit | 48fd38c57346ad9ccc63cea271c9b9a1cbeb38fe | [log] [tgz] |
---|---|---|
author | Vedant Kumar <vsk@apple.com> | Thu May 10 23:01:54 2018 +0000 |
committer | Vedant Kumar <vsk@apple.com> | Thu May 10 23:01:54 2018 +0000 |
tree | 0942a87911f4d653a9f8402c11612ffc6998acc9 | |
parent | fd0a9c3d8a037210f68b960b663d97ec9506b300 [diff] |
[STLExtras] Add distance() for ranges, pred_size(), and succ_size() This commit adds a wrapper for std::distance() which works with ranges. As it would be a common case to write `distance(predecessors(BB))`, this also introduces `pred_size()` and `succ_size()` helpers to make that easier to write. Differential Revision: https://reviews.llvm.org/D46668 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@332057 91177308-0d34-0410-b5e6-96231b3b80d8