add and use a callee_iterator typedef

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21037 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2005-04-02 20:02:32 +00:00
parent 021decc82d
commit da7c380eb4
2 changed files with 7 additions and 5 deletions

View File

@ -157,11 +157,12 @@ public:
return ActualCallees;
}
ActualCalleesTy::iterator callee_begin(Instruction *I) const {
typedef ActualCalleesTy::const_iterator callee_iterator;
callee_iterator callee_begin(Instruction *I) const {
return ActualCallees.lower_bound(std::pair<Instruction*,Function*>(I, 0));
}
ActualCalleesTy::iterator callee_end(Instruction *I) const {
callee_iterator callee_end(Instruction *I) const {
I = (Instruction*)((char*)I + 1);
return ActualCallees.lower_bound(std::pair<Instruction*,Function*>(I, 0));
}

View File

@ -100,12 +100,13 @@ namespace llvm {
const ActualCalleesTy &getActualCallees() const {
return ActualCallees;
}
ActualCalleesTy::iterator callee_begin(Instruction *I) const {
typedef ActualCalleesTy::const_iterator callee_iterator;
callee_iterator callee_begin(Instruction *I) const {
return ActualCallees.lower_bound(std::pair<Instruction*,Function*>(I, 0));
}
ActualCalleesTy::iterator callee_end(Instruction *I) const {
callee_iterator callee_end(Instruction *I) const {
I = (Instruction*)((char*)I + 1);
return ActualCallees.lower_bound(std::pair<Instruction*,Function*>(I, 0));
}