| 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 |
| 11 /// \brief Defines the browser-based compile server. | 11 /// \brief Defines the browser-based compile server. |
| 12 /// | 12 /// |
| 13 //===----------------------------------------------------------------------===// | 13 //===----------------------------------------------------------------------===// |
| 14 | 14 |
| 15 // Can only compile this with the NaCl compiler (needs irt.h, and the | 15 // Can only compile this with the NaCl compiler (needs irt.h, and the |
| 16 // unsandboxed LLVM build using the trusted compiler does not have irt.h). | 16 // unsandboxed LLVM build using the trusted compiler does not have irt.h). |
| 17 #include "IceBrowserCompileServer.h" |
| 18 |
| 17 #if PNACL_BROWSER_TRANSLATOR | 19 #if PNACL_BROWSER_TRANSLATOR |
| 18 | 20 |
| 19 #include "IceBrowserCompileServer.h" | |
| 20 | |
| 21 // Headers which are not properly part of the SDK are included by their path in | 21 // Headers which are not properly part of the SDK are included by their path in |
| 22 // the NaCl tree. | 22 // the NaCl tree. |
| 23 #ifdef __pnacl__ | 23 #ifdef __pnacl__ |
| 24 #include "native_client/src/untrusted/nacl/pnacl.h" | 24 #include "native_client/src/untrusted/nacl/pnacl.h" |
| 25 #endif // __pnacl__ | 25 #endif // __pnacl__ |
| 26 | 26 |
| 27 #include "llvm/Support/QueueStreamer.h" | 27 #include "llvm/Support/QueueStreamer.h" |
| 28 | 28 |
| 29 #include <cstring> | 29 #include <cstring> |
| 30 #include <irt.h> | 30 #include <irt.h> |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 Ctx->initParserThread(); | 223 Ctx->initParserThread(); |
| 224 this->getCompiler().run(ExtraFlags, *Ctx.get(), | 224 this->getCompiler().run(ExtraFlags, *Ctx.get(), |
| 225 // Retain original reference, but the compiler | 225 // Retain original reference, but the compiler |
| 226 // (LLVM's MemoryObject) wants to handle deletion. | 226 // (LLVM's MemoryObject) wants to handle deletion. |
| 227 std::unique_ptr<llvm::DataStreamer>(InputStream)); | 227 std::unique_ptr<llvm::DataStreamer>(InputStream)); |
| 228 }); | 228 }); |
| 229 } | 229 } |
| 230 | 230 |
| 231 } // end of namespace Ice | 231 } // end of namespace Ice |
| 232 | 232 |
| 233 #else // !PNACL_BROWSER_TRANSLATOR |
| 234 |
| 235 #include "llvm/Support/ErrorHandling.h" |
| 236 |
| 237 namespace Ice { |
| 238 |
| 239 BrowserCompileServer::~BrowserCompileServer() {} |
| 240 |
| 241 void BrowserCompileServer::run() { |
| 242 llvm::report_fatal_error("no browser hookups"); |
| 243 } |
| 244 |
| 245 ErrorCode &BrowserCompileServer::getErrorCode() { |
| 246 llvm::report_fatal_error("no browser hookups"); |
| 247 } |
| 248 |
| 249 } // end of namespace Ice |
| 250 |
| 233 #endif // PNACL_BROWSER_TRANSLATOR | 251 #endif // PNACL_BROWSER_TRANSLATOR |
| OLD | NEW |