OLD | NEW |
1 //===- subzero/src/IceBrowserCompileServer.h - Browser server ---*- C++ -*-===// | 1 //===- subzero/src/IceBrowserCompileServer.h - Browser server ---*- C++ -*-===// |
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 public: | 43 public: |
44 BrowserCompileServer() : HadError(false) {} | 44 BrowserCompileServer() : HadError(false) {} |
45 | 45 |
46 ~BrowserCompileServer() final; | 46 ~BrowserCompileServer() final; |
47 | 47 |
48 void run() final; | 48 void run() final; |
49 | 49 |
50 ErrorCode &getErrorCode() final; | 50 ErrorCode &getErrorCode() final; |
51 | 51 |
52 /// Parse and set up the flags for compile jobs. | 52 /// Parse and set up the flags for compile jobs. |
53 void getParsedFlags(uint32_t NumThreads, int argc, char **argv); | 53 void getParsedFlags(bool UseNumThreadsFromBrowser, uint32_t NumThreads, |
| 54 int argc, char **argv); |
54 | 55 |
55 /// Creates the streams + context and starts the compile thread, handing off | 56 /// Creates the streams + context and starts the compile thread, handing off |
56 /// the streams + context. | 57 /// the streams + context. |
57 void startCompileThread(int OutFD); | 58 void startCompileThread(int OutFD); |
58 | 59 |
59 /// Call to push more bytes to the current input stream. Returns false on | 60 /// Call to push more bytes to the current input stream. Returns false on |
60 /// success and true on error. | 61 /// success and true on error. |
61 bool pushInputBytes(const void *Data, size_t NumBytes); | 62 bool pushInputBytes(const void *Data, size_t NumBytes); |
62 | 63 |
63 /// Notify the input stream of EOF. | 64 /// Notify the input stream of EOF. |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 std::unique_ptr<llvm::raw_fd_ostream> EmitStream; | 102 std::unique_ptr<llvm::raw_fd_ostream> EmitStream; |
102 std::unique_ptr<StringStream> ErrorStream; | 103 std::unique_ptr<StringStream> ErrorStream; |
103 std::unique_ptr<ELFStreamer> ELFStream; | 104 std::unique_ptr<ELFStreamer> ELFStream; |
104 std::thread CompileThread; | 105 std::thread CompileThread; |
105 std::atomic<bool> HadError; | 106 std::atomic<bool> HadError; |
106 }; | 107 }; |
107 | 108 |
108 } // end of namespace Ice | 109 } // end of namespace Ice |
109 | 110 |
110 #endif // SUBZERO_SRC_ICEBROWSERCOMPILESERVER_H | 111 #endif // SUBZERO_SRC_ICEBROWSERCOMPILESERVER_H |
OLD | NEW |