diff options
| author | Chris Lattner <sabre@nondot.org> | 2003-03-17 18:11:27 +0000 | 
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2003-03-17 18:11:27 +0000 | 
| commit | 9c19c07e8b9609178df81fd1390dc0e070c25c19 (patch) | |
| tree | 67a5d420bf060b917da3e60150e6884e4d5dba3a | |
| parent | c2bd7cf9fa1c89138c0c59750a348ea2030f4ce1 (diff) | |
| download | bcm5719-llvm-9c19c07e8b9609178df81fd1390dc0e070c25c19.tar.gz bcm5719-llvm-9c19c07e8b9609178df81fd1390dc0e070c25c19.zip | |
Fix problems with BitSetVector that makes it not compile under GCC 3.0 and 2.95
llvm-svn: 5745
| -rw-r--r-- | llvm/include/Support/BitSetVector.h | 12 | 
1 files changed, 6 insertions, 6 deletions
| diff --git a/llvm/include/Support/BitSetVector.h b/llvm/include/Support/BitSetVector.h index 67b63dc7291..e52ca17c6b1 100644 --- a/llvm/include/Support/BitSetVector.h +++ b/llvm/include/Support/BitSetVector.h @@ -194,8 +194,8 @@ public:      iterator(const iterator& I)        : currentBit(I.currentBit),currentWord(I.currentWord),bitvec(I.bitvec) { }      iterator& operator=(const iterator& I) { -      currentWord == I.currentWord; -      currentBit == I.currentBit; +      currentWord = I.currentWord; +      currentBit = I.currentBit;        bitvec = I.bitvec;        return *this;      } @@ -203,13 +203,13 @@ public:      // Increment and decrement operators (pre and post)      iterator& operator++() {        if (++currentBit == WORDSIZE) -        { currentBit = 0; if (currentWord < bitvec->maxSize) ++currentWord; } +        { currentBit = 0; if (currentWord < bitvec->size()) ++currentWord; }        return *this;      }      iterator& operator--() {        if (currentBit == 0) {          currentBit = WORDSIZE-1; -        currentWord = (currentWord == 0)? bitvec->maxSize : --currentWord; +        currentWord = (currentWord == 0)? bitvec->size() : --currentWord;        }        else          --currentBit; @@ -220,7 +220,7 @@ public:      // Dereferencing operators      reference operator*() { -      assert(currentWord < bitvec->maxSize && +      assert(currentWord < bitvec->size() &&               "Dereferencing iterator past the end of a BitSetVector");        return bitvec->getWord(currentWord)[currentBit];      } @@ -234,7 +234,7 @@ public:    protected:      static iterator begin(BitSetVector& _bitvec) { return iterator(_bitvec); }      static iterator end(BitSetVector& _bitvec)   { return iterator(0, -                                                    _bitvec.maxSize, _bitvec); } +                                                    _bitvec.size(), _bitvec); }      friend class BitSetVector;    };  }; | 

