Chromium Code Reviews| Index: src/IceBrowserCompileServer.h |
| diff --git a/src/IceBrowserCompileServer.h b/src/IceBrowserCompileServer.h |
| index 1ef8121ab1b1cd3a46283498f18a65d00262a80a..e19bb38a0b3c8b6c8874723ac5270cea8466b6b6 100644 |
| --- a/src/IceBrowserCompileServer.h |
| +++ b/src/IceBrowserCompileServer.h |
| @@ -75,6 +75,16 @@ public: |
| } |
| private: |
| + class StringStream { |
| + public: |
| + StringStream() : StrBuf(Buffer) {} |
| + std::string getContents() { return StrBuf.str(); } |
|
jvoung (off chromium)
2015/04/20 21:41:57
Might be able to return a reference to the string
Karl
2015/04/22 22:23:50
Done.
|
| + Ostream &getStream() { return StrBuf; } |
| + private: |
| + std::string Buffer; |
| + llvm::raw_string_ostream StrBuf; |
| + }; |
| + |
| // This currently only handles a single compile request, hence one copy |
| // of the state. |
| std::unique_ptr<GlobalContext> Ctx; |
| @@ -84,6 +94,7 @@ private: |
| llvm::QueueStreamer *InputStream; |
| std::unique_ptr<Ostream> LogStream; |
| std::unique_ptr<llvm::raw_fd_ostream> EmitStream; |
| + std::unique_ptr<StringStream> ErrorStream; |
| std::unique_ptr<ELFStreamer> ELFStream; |
| ClFlags Flags; |
| ClFlagsExtra ExtraFlags; |