OLD | NEW |
1 //===- subzero/src/IceBrowserCompileServer.cpp - Browser compile server ---===// | 1 //===- subzero/src/IceBrowserCompileServer.cpp - Browser compile server ---===// |
2 // | 2 // |
3 // The Subzero Code Generator | 3 // The Subzero Code Generator |
4 // | 4 // |
5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
7 // | 7 // |
8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
9 /// | 9 /// |
10 /// \file | 10 /// \file |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 } | 270 } |
271 return LastError; | 271 return LastError; |
272 } | 272 } |
273 | 273 |
274 void BrowserCompileServer::endInputStream() { InputStream->SetDone(); } | 274 void BrowserCompileServer::endInputStream() { InputStream->SetDone(); } |
275 | 275 |
276 void BrowserCompileServer::startCompileThread(int ObjFD) { | 276 void BrowserCompileServer::startCompileThread(int ObjFD) { |
277 InputStream = new llvm::QueueStreamer(); | 277 InputStream = new llvm::QueueStreamer(); |
278 bool LogStreamFailure = false; | 278 bool LogStreamFailure = false; |
279 int LogFD = STDOUT_FILENO; | 279 int LogFD = STDOUT_FILENO; |
280 if (getFlags().getLogFilename() == "/dev/stderr") { | 280 if (getFlags().getLogFilename() == "-") { |
| 281 // Common case, do nothing. |
| 282 } else if (getFlags().getLogFilename() == "/dev/stderr") { |
281 LogFD = STDERR_FILENO; | 283 LogFD = STDERR_FILENO; |
282 } else { | 284 } else { |
283 LogStreamFailure = true; | 285 LogStreamFailure = true; |
284 } | 286 } |
285 LogStream = getOutputStream(LogFD); | 287 LogStream = getOutputStream(LogFD); |
286 LogStream->SetUnbuffered(); | 288 LogStream->SetUnbuffered(); |
287 if (LogStreamFailure) { | 289 if (LogStreamFailure) { |
288 *LogStream | 290 *LogStream |
289 << "Warning: Log file name must be either '-' or '/dev/stderr'\n"; | 291 << "Warning: Log file name must be either '-' or '/dev/stderr'\n"; |
290 } | 292 } |
(...skipping 28 matching lines...) Expand all Loading... |
319 llvm::report_fatal_error("no browser hookups"); | 321 llvm::report_fatal_error("no browser hookups"); |
320 } | 322 } |
321 | 323 |
322 ErrorCode &BrowserCompileServer::getErrorCode() { | 324 ErrorCode &BrowserCompileServer::getErrorCode() { |
323 llvm::report_fatal_error("no browser hookups"); | 325 llvm::report_fatal_error("no browser hookups"); |
324 } | 326 } |
325 | 327 |
326 } // end of namespace Ice | 328 } // end of namespace Ice |
327 | 329 |
328 #endif // PNACL_BROWSER_TRANSLATOR | 330 #endif // PNACL_BROWSER_TRANSLATOR |
OLD | NEW |