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

Unified Diff: src/IceGlobalContext.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 nits and syntax errors. 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 | « src/IceCompileServer.cpp ('k') | src/IceGlobalContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceGlobalContext.h
diff --git a/src/IceGlobalContext.h b/src/IceGlobalContext.h
index 9264d4302fbc0d6990e4261c399630ea1fafab39..a1fd133c5d002201e4bfe10b3afc8d759343ff79 100644
--- a/src/IceGlobalContext.h
+++ b/src/IceGlobalContext.h
@@ -145,14 +145,17 @@ class GlobalContext {
};
public:
- GlobalContext(Ostream *OsDump, Ostream *OsEmit, ELFStreamer *ELFStreamer,
- const ClFlags &Flags);
+ // The dump stream is a log stream while emit is the stream code
+ // is emitted to. The error stream is strictly for logging errors.
+ GlobalContext(Ostream *OsDump, Ostream *OsEmit, Ostream *OsError,
+ ELFStreamer *ELFStreamer, const ClFlags &Flags);
~GlobalContext();
- // The dump and emit streams need to be used by only one thread at a
- // time. This is done by exclusively reserving the streams via
- // lockStr() and unlockStr(). The OstreamLocker class can be used
- // to conveniently manage this.
+ //
+ // The dump, error, and emit streams need to be used by only one
+ // thread at a time. This is done by exclusively reserving the
+ // streams via lockStr() and unlockStr(). The OstreamLocker class
+ // can be used to conveniently manage this.
//
// The model is that a thread grabs the stream lock, then does an
// arbitrary amount of work during which far-away callees may grab
@@ -163,6 +166,7 @@ public:
void lockStr() { StrLock.lock(); }
void unlockStr() { StrLock.unlock(); }
Ostream &getStrDump() { return *StrDump; }
+ Ostream &getStrError() { return *StrError; }
Ostream &getStrEmit() { return *StrEmit; }
LockedPtr<ErrorCode> getErrorStatus() {
@@ -418,6 +422,7 @@ private:
StrLockType StrLock;
Ostream *StrDump; // Stream for dumping / diagnostics
Ostream *StrEmit; // Stream for code emission
+ Ostream *StrError; // Stream for logging errors.
ICE_CACHELINE_BOUNDARY;
« no previous file with comments | « src/IceCompileServer.cpp ('k') | src/IceGlobalContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698