diff options
| author | Roman Divacky <rdivacky@FreeBSD.org> | 2010-05-27 15:15:58 +0000 | 
|---|---|---|
| committer | Roman Divacky <rdivacky@FreeBSD.org> | 2010-05-27 15:15:58 +0000 | 
| commit | abdf259d487163e72081a8cf4991b1617206b41e (patch) | |
| tree | 9fad9a5d5dd8c4ff54af48edad9c8cc26dd5fda1 /include/llvm/ADT/SparseBitVector.h | |
| parent | 59161dfae3225dd9151afbc76ca9074598c0c605 (diff) | |
Notes
Diffstat (limited to 'include/llvm/ADT/SparseBitVector.h')
| -rw-r--r-- | include/llvm/ADT/SparseBitVector.h | 16 | 
1 files changed, 10 insertions, 6 deletions
diff --git a/include/llvm/ADT/SparseBitVector.h b/include/llvm/ADT/SparseBitVector.h index 6c813ecd36b2..0862981887ab 100644 --- a/include/llvm/ADT/SparseBitVector.h +++ b/include/llvm/ADT/SparseBitVector.h @@ -889,13 +889,17 @@ operator-(const SparseBitVector<ElementSize> &LHS,  // Dump a SparseBitVector to a stream  template <unsigned ElementSize>  void dump(const SparseBitVector<ElementSize> &LHS, raw_ostream &out) { -  out << "[ "; - -  typename SparseBitVector<ElementSize>::iterator bi; -  for (bi = LHS.begin(); bi != LHS.end(); ++bi) { -    out << *bi << " "; +  out << "["; + +  typename SparseBitVector<ElementSize>::iterator bi = LHS.begin(), +    be = LHS.end(); +  if (bi != be) { +    out << *bi; +    for (++bi; bi != be; ++bi) { +      out << " " << *bi; +    }    } -  out << " ]\n"; +  out << "]\n";  }  } // end namespace llvm  | 
