diff options
author | Chris Lattner <sabre@nondot.org> | 2001-09-07 16:20:18 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2001-09-07 16:20:18 +0000 |
commit | f7bd6392906a8edb31a802c835b074e5cbdce774 (patch) | |
tree | 2ef7b6f12d937cbf8c2b5e856fa3dc02cb2749f4 /include | |
parent | be4c4001f416889fff216e74b5130b3d27d0df2a (diff) | |
download | external_llvm-f7bd6392906a8edb31a802c835b074e5cbdce774.zip external_llvm-f7bd6392906a8edb31a802c835b074e5cbdce774.tar.gz external_llvm-f7bd6392906a8edb31a802c835b074e5cbdce774.tar.bz2 |
* Support new setName interface
* Make the iterator a little nicer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@422 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Function.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/llvm/Function.h b/include/llvm/Function.h index 59849c6..b1d38dd 100644 --- a/include/llvm/Function.h +++ b/include/llvm/Function.h @@ -48,7 +48,7 @@ public: ~Method(); // Specialize setName to handle symbol table majik... - virtual void setName(const string &name); + virtual void setName(const string &name, SymbolTable *ST = 0); const Type *getReturnType() const; const MethodType *getMethodType() const; @@ -146,7 +146,7 @@ public: inline BIty &getInstructionIterator() { return BI; } inline IIty operator*() const { return *BI; } - inline IIty *operator->() const { return &(operator*()); } + inline IIty operator->() const { return operator*(); } inline bool operator==(const InstIterator &y) const { return BB == y.BB && (BI == y.BI || BB == BBs.end()); @@ -163,7 +163,7 @@ public: // The only way that the II could be broken is if it is now pointing to // the end() of the current BasicBlock and there are successor BBs. while (BI == (*BB)->end()) { - ++BB; + ++BB; if (BB == BBs.end()) break; BI = (*BB)->begin(); } @@ -189,6 +189,8 @@ public: inline InstIterator operator--(int) { InstIterator tmp = *this; --*this; return tmp; } + + inline bool atEnd() const { return BB == BBs.end(); } }; inline inst_iterator inst_begin() { return inst_iterator(*this); } |