There's been no wholesale effort to add range adapters. Were just adding
them as/when someone feels the need. Feel free to add any you happen n to
wasn't/need.
Personally I think the phi's/non_phi's would be especially helpful over
the
existing formulation. (I think there's a similar work in some other APIs
(maybe operands to an instruction?) Where a list is split into two by some
boundary iterator and would be nice as two range accessor's for the
distinct sub ranges and one for the overall range.
On Jul 8, 2014 12:35 AM, "Manuel Jacob" <me at manueljacob.de>
wrote:
> Hi all,
>
> while converting some code to use C++11 features, I noticed that some
> commonly used iterators don't have range adapters. What do you think
about
> adding these?
>
> llvm/IR/InstIterator.h:
> inst_begin() / inst_end() -> instructions()
>
> llvm/IR/CFG.h:
> pred_begin() / pred_end() -> predecessors()
> succ_begin() / succ_end() -> successors()
>
> llvm/IR/BasicBlock.h:
> BasicBlock::begin() / BasicBlock::getFirstNonPHI() -> BasicBlock::phis()
> BasicBlock::getFirstNonPHI() / BasicBlock::end() ->
BasicBlock::non_phis()
>
> -Manuel
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20140708/f5326a46/attachment.html>