Teach raw_ostream to accept SmallString.

Saves adding .str() call to any raw_ostream << SmallString usage
and a small step towards making .str() consistent in the ADTs by
removing one of the SmallString::str() use cases, discussion at

http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20141013/240026.html

I'll update the Phabricator patch http://reviews.llvm.org/D6372
for review of the Twine SmallString support, it's more complex
than this one.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231763 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Yaron Keren
2015-03-10 07:33:23 +00:00
parent 3a3665fd38
commit 1132d0cc5b
6 changed files with 17 additions and 12 deletions

View File

@ -2291,7 +2291,7 @@ void APInt::dump() const {
this->toStringUnsigned(U);
this->toStringSigned(S);
dbgs() << "APInt(" << BitWidth << "b, "
<< U.str() << "u " << S.str() << "s)";
<< U << "u " << S << "s)";
}
void APInt::print(raw_ostream &OS, bool isSigned) const {