llvm.org GIT mirror llvm / 90117cb
Remove long-dead obsolete cruft git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5955 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 17 years ago
1 changed file(s) with 2 addition(s) and 10 deletion(s). Raw diff Collapse all Expand all
2525 typedef PredIterator<_Ptr,_USE_iterator> _Self;
2626 typedef typename super::pointer pointer;
2727
28 inline void advancePastConstants() {
29 // TODO: This is bad
30 // Loop to ignore constant pool references
31 while (It != BB->use_end() && !isa(*It))
32 ++It;
33 }
34
3528 inline PredIterator(_Ptr *bb) : BB(bb), It(bb->use_begin()) {
36 advancePastConstants();
3729 }
3830 inline PredIterator(_Ptr *bb, bool) : BB(bb), It(bb->use_end()) {}
3931
4234
4335 inline pointer operator*() const {
4436 assert(It != BB->use_end() && "pred_iterator out of range!");
45 return cast<Instruction>(*It)->getParent();
37 return cast<TerminatorInst>(*It)->getParent();
4638 }
4739 inline pointer *operator->() const { return &(operator*()); }
4840
4941 inline _Self& operator++() { // Preincrement
5042 assert(It != BB->use_end() && "pred_iterator out of range!");
51 ++It; advancePastConstants();
43 ++It;
5244 return *this;
5345 }
5446