Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Unified Diff: src/IceBrowserCompileServer.h

Issue 1052833003: First attempt to capture parser/translation errors in browser. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix nit. Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/IceBrowserCompileServer.cpp » ('j') | src/IceBrowserCompileServer.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « no previous file | src/IceBrowserCompileServer.cpp » ('j') | src/IceBrowserCompileServer.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698