diff options
author | Yaron Keren <yaron.keren@gmail.com> | 2015-03-10 07:33:23 +0000 |
---|---|---|
committer | Yaron Keren <yaron.keren@gmail.com> | 2015-03-10 07:33:23 +0000 |
commit | 09fb7c6e7a173a1a8bdb7a53438b0c75250491b8 (patch) | |
tree | b26517281f61c7217a0e6aef1dfe85a2242592fe /llvm/utils | |
parent | 62b63b197dc7f1c7eb80f3b15ede1626ec637ffb (diff) | |
download | bcm5719-llvm-09fb7c6e7a173a1a8bdb7a53438b0c75250491b8.tar.gz bcm5719-llvm-09fb7c6e7a173a1a8bdb7a53438b0c75250491b8.zip |
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.
llvm-svn: 231763
Diffstat (limited to 'llvm/utils')
-rw-r--r-- | llvm/utils/TableGen/AsmWriterEmitter.cpp | 2 | ||||
-rw-r--r-- | llvm/utils/TableGen/DAGISelMatcherEmitter.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/llvm/utils/TableGen/AsmWriterEmitter.cpp b/llvm/utils/TableGen/AsmWriterEmitter.cpp index 587de26f6d5..447b7c81039 100644 --- a/llvm/utils/TableGen/AsmWriterEmitter.cpp +++ b/llvm/utils/TableGen/AsmWriterEmitter.cpp @@ -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) << '}'; diff --git a/llvm/utils/TableGen/DAGISelMatcherEmitter.cpp b/llvm/utils/TableGen/DAGISelMatcherEmitter.cpp index 302f27bd0ec..4659dc15733 100644 --- a/llvm/utils/TableGen/DAGISelMatcherEmitter.cpp +++ b/llvm/utils/TableGen/DAGISelMatcherEmitter.cpp @@ -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; } |