| OLD | NEW |
| 1 //===- subzero/src/main.cpp - Entry point for bitcode translation ---------===// | 1 //===- subzero/src/main.cpp - Entry point for bitcode translation ---------===// |
| 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 /// This file defines the entry point for translating PNaCl bitcode into | 11 /// This file defines the entry point for translating PNaCl bitcode into native |
| 12 /// native code. | 12 /// code. |
| 13 /// | 13 /// |
| 14 //===----------------------------------------------------------------------===// | 14 //===----------------------------------------------------------------------===// |
| 15 | 15 |
| 16 #include "IceBrowserCompileServer.h" | 16 #include "IceBrowserCompileServer.h" |
| 17 #include "IceCompiler.h" | 17 #include "IceCompiler.h" |
| 18 #include "IceCompileServer.h" | 18 #include "IceCompileServer.h" |
| 19 | 19 |
| 20 int main(int argc, char **argv) { | 20 int main(int argc, char **argv) { |
| 21 // Start file server and "wait" for compile request. | 21 // Start file server and "wait" for compile request. |
| 22 Ice::Compiler Comp; | 22 Ice::Compiler Comp; |
| 23 // Can only compile the BrowserCompileServer w/ the NaCl compiler. | 23 // Can only compile the BrowserCompileServer w/ the NaCl compiler. |
| 24 #if PNACL_BROWSER_TRANSLATOR | 24 #if PNACL_BROWSER_TRANSLATOR |
| 25 // There are no real commandline arguments in the browser case. | 25 // There are no real commandline arguments in the browser case. They are |
| 26 // They are supplied via IPC. | 26 // supplied via IPC. |
| 27 assert(argc == 1); | 27 assert(argc == 1); |
| 28 (void)argc; | 28 (void)argc; |
| 29 (void)argv; | 29 (void)argv; |
| 30 Ice::BrowserCompileServer Server(Comp); | 30 Ice::BrowserCompileServer Server(Comp); |
| 31 Server.run(); | 31 Server.run(); |
| 32 return Server.getErrorCode().value(); | 32 return Server.getErrorCode().value(); |
| 33 #else // !PNACL_BROWSER_TRANSLATOR | 33 #else // !PNACL_BROWSER_TRANSLATOR |
| 34 Ice::CLCompileServer Server(Comp, argc, argv); | 34 Ice::CLCompileServer Server(Comp, argc, argv); |
| 35 Server.run(); | 35 Server.run(); |
| 36 return Server.getErrorCode().value(); | 36 return Server.getErrorCode().value(); |
| 37 #endif // !PNACL_BROWSER_TRANSLATOR | 37 #endif // !PNACL_BROWSER_TRANSLATOR |
| 38 } | 38 } |
| OLD | NEW |