mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +00:00
Added "str()" method to raw_string_ostream.
str() mirrors the same method in std::ostringstream. str() flushes the buffered stream contents to string and returns a reference to the string. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55370 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9783d62422
commit
3d4866e683
@ -219,6 +219,13 @@ public:
|
||||
raw_string_ostream(std::string &O) : OS(O) {}
|
||||
~raw_string_ostream();
|
||||
|
||||
/// str - Flushes the stream contents to the target string and returns
|
||||
/// the strings reference.
|
||||
std::string& str() {
|
||||
flush();
|
||||
return OS;
|
||||
}
|
||||
|
||||
/// flush_impl - The is the piece of the class that is implemented by
|
||||
/// subclasses. This outputs the currently buffered data and resets the
|
||||
/// buffer to empty.
|
||||
|
Loading…
Reference in New Issue
Block a user