llvm.org GIT mirror llvm / ec39cb9
Move dump out of class, use "\n" instead of endl git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41872 91177308-0d34-0410-b5e6-96231b3b80d8 Daniel Berlin 13 years ago
1 changed file(s) with 14 addition(s) and 11 deletion(s). Raw diff Collapse all Expand all
795795 return iterator(this, ~0);
796796 }
797797
798 // Dump our bits to stderr
799 void dump(llvm::OStream &out) const {
800 out << "[ ";
801 for (iterator bi = begin();
802 bi != end();
803 ++bi) {
804 out << *bi << " ";
805 }
806 out << std::endl;
807 }
808798 };
809799
810800 // Convenience functions to allow Or and And without dereferencing in the user
833823 const SparseBitVector *RHS) {
834824 return LHS &= (*RHS);
835825 }
836
826
827
828 // Dump a SparseBitVector to a stream
829 template
830 void dump(const SparseBitVector &LHS, llvm::OStream &out) {
831 out << "[ ";
832
833 typename SparseBitVector::iterator bi;
834 for (bi = LHS.begin(); bi != LHS.end(); ++bi) {
835 out << *bi << " ";
836 }
837 out << "\n";
837838 }
838839
840 }
841
839842 #endif