From: David Blaikie Date: Sun, 15 Mar 2015 01:40:42 +0000 (+0000) Subject: Remove use of a reserved identifier X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=00286ad35fca411e0858c0ead776ea9f2bf83982;p=oota-llvm.git Remove use of a reserved identifier (& some unnecessary 'inline' keywords, too) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232303 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Analysis/ConstantsScanner.h b/include/llvm/Analysis/ConstantsScanner.h index d3d0a44bd6d..08632c9e90e 100644 --- a/include/llvm/Analysis/ConstantsScanner.h +++ b/include/llvm/Analysis/ConstantsScanner.h @@ -27,37 +27,36 @@ class constant_iterator : public std::iteratorgetNumOperands() && "isAtConstant called with invalid arguments!"); return isa(InstI->getOperand(OpIdx)); } public: - inline constant_iterator(const Function *F) : InstI(inst_begin(F)), OpIdx(0) { + constant_iterator(const Function *F) : InstI(inst_begin(F)), OpIdx(0) { // Advance to first constant... if we are not already at constant or end if (InstI != inst_end(F) && // InstI is valid? (InstI->getNumOperands() == 0 || !isAtConstant())) // Not at constant? operator++(); } - inline constant_iterator(const Function *F, bool) // end ctor - : InstI(inst_end(F)), OpIdx(0) { - } + constant_iterator(const Function *F, bool) // end ctor + : InstI(inst_end(F)), + OpIdx(0) {} - inline bool operator==(const _Self& x) const { return OpIdx == x.OpIdx && - InstI == x.InstI; } - inline bool operator!=(const _Self& x) const { return !operator==(x); } + bool operator==(const constant_iterator &x) const { + return OpIdx == x.OpIdx && InstI == x.InstI; + } + bool operator!=(const constant_iterator &x) const { return !(*this == x); } - inline pointer operator*() const { + pointer operator*() const { assert(isAtConstant() && "Dereferenced an iterator at the end!"); return cast(InstI->getOperand(OpIdx)); } - inline pointer operator->() const { return operator*(); } + pointer operator->() const { return **this; } - inline _Self& operator++() { // Preincrement implementation + constant_iterator &operator++() { // Preincrement implementation ++OpIdx; do { unsigned NumOperands = InstI->getNumOperands(); @@ -73,11 +72,13 @@ public: return *this; // At the end of the method } - inline _Self operator++(int) { // Postincrement - _Self tmp = *this; ++*this; return tmp; + onstant_iterator operator++(int) { // Postincrement + constant_iterator tmp = *this; + ++*this; + return tmp; } - inline bool atEnd() const { return InstI.atEnd(); } + bool atEnd() const { return InstI.atEnd(); } }; inline constant_iterator constant_begin(const Function *F) {