mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-25 10:27:04 +00:00
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:
@@ -727,7 +727,7 @@ public:
|
||||
OS.flush();
|
||||
|
||||
// Emit the string.
|
||||
O.indent(6) << "AsmString = \"" << OutString.str() << "\";\n";
|
||||
O.indent(6) << "AsmString = \"" << OutString << "\";\n";
|
||||
|
||||
O.indent(6) << "break;\n";
|
||||
O.indent(4) << '}';
|
||||
|
||||
@@ -188,7 +188,7 @@ EmitMatcher(const Matcher *N, unsigned Indent, unsigned CurrentIdx,
|
||||
<< " children in Scope";
|
||||
}
|
||||
|
||||
OS << '\n' << TmpBuf.str();
|
||||
OS << '\n' << TmpBuf;
|
||||
CurrentIdx += ChildSize;
|
||||
}
|
||||
|
||||
@@ -342,7 +342,7 @@ EmitMatcher(const Matcher *N, unsigned Indent, unsigned CurrentIdx,
|
||||
if (!OmitComments)
|
||||
OS << "// ->" << CurrentIdx+ChildSize;
|
||||
OS << '\n';
|
||||
OS << TmpBuf.str();
|
||||
OS << TmpBuf;
|
||||
CurrentIdx += ChildSize;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user