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/cfe/trunk@231763
91177308-0d34-0410-b5e6-
96231b3b80d8
Str += llvm::utostr(AnonStructId);
Out << Str.size();
- Out << Str.str();
+ Out << Str;
break;
}
if (PLoc.isValid()) {
FN += PLoc.getFilename();
Lexer::Stringify(FN);
- OS << '"' << FN.str() << '"';
+ OS << '"' << FN << '"';
}
Tok.setKind(tok::string_literal);
} else if (II == Ident__DATE__) {
SmallString<128> P;
int FD;
llvm::sys::fs::createTemporaryFile("llvm_ubi", "", FD, P);
- llvm::errs() << "Writing '" << P.str() << "'.\n";
+ llvm::errs() << "Writing '" << P << "'.\n";
auto Stream = llvm::make_unique<llvm::raw_fd_ostream>(FD, true);
llvm::TimeRecord TR = llvm::TimeRecord::getCurrentTime();
OS << llvm::format("%7.4f] ", TR.getWallTime() - sBeginTR.getWallTime());
- OS << Msg.str() << '\n';
+ OS << Msg << '\n';
if (Trace) {
llvm::sys::PrintStackTrace(OS);
OS <<
" case " << I << " : {\n"
- " OS << \"" + Prefix.str() + Spelling.str();
+ " OS << \"" << Prefix << Spelling;
if (Variety == "Pragma") {
OS << " \";\n";
if (!Args.empty())
OS << ")";
- OS << Suffix.str() + "\";\n";
+ OS << Suffix + "\";\n";
OS <<
" break;\n"