| OLD | NEW |
| 1 //===- subzero/src/IceCompileServer.cpp - Compile server ------------------===// | 1 //===- subzero/src/IceCompileServer.cpp - 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 // This file defines the basic commandline-based compile server. | 10 // This file defines the basic commandline-based compile server. |
| 11 // | 11 // |
| 12 //===----------------------------------------------------------------------===// | 12 //===----------------------------------------------------------------------===// |
| 13 | 13 |
| 14 #include <fstream> | 14 #include "IceCompileServer.h" |
| 15 #include <iostream> | |
| 16 #include <thread> | |
| 17 | 15 |
| 16 #include "IceClFlags.h" |
| 17 #include "IceClFlagsExtra.h" |
| 18 #include "IceELFStreamer.h" |
| 19 #include "IceGlobalContext.h" |
| 18 // Include code to handle converting textual bitcode records to binary (for | 20 // Include code to handle converting textual bitcode records to binary (for |
| 19 // INPUT_IS_TEXTUAL_BITCODE). | 21 // INPUT_IS_TEXTUAL_BITCODE). |
| 20 #include "llvm/Bitcode/NaCl/NaClBitcodeMungeUtils.h" | 22 #include "llvm/Bitcode/NaCl/NaClBitcodeMungeUtils.h" |
| 21 | |
| 22 #include "llvm/Support/FileSystem.h" | 23 #include "llvm/Support/FileSystem.h" |
| 23 #include "llvm/Support/raw_os_ostream.h" | 24 #include "llvm/Support/raw_os_ostream.h" |
| 24 #include "llvm/Support/Signals.h" | 25 #include "llvm/Support/Signals.h" |
| 25 #include "llvm/Support/SourceMgr.h" | 26 #include "llvm/Support/SourceMgr.h" |
| 26 #include "llvm/Support/StreamingMemoryObject.h" | 27 #include "llvm/Support/StreamingMemoryObject.h" |
| 27 | 28 |
| 28 #include "IceClFlags.h" | 29 #include <fstream> |
| 29 #include "IceClFlagsExtra.h" | 30 #include <iostream> |
| 30 #include "IceCompileServer.h" | 31 #include <thread> |
| 31 #include "IceELFStreamer.h" | |
| 32 #include "IceGlobalContext.h" | |
| 33 | 32 |
| 34 namespace Ice { | 33 namespace Ice { |
| 35 | 34 |
| 36 namespace { | 35 namespace { |
| 37 | 36 |
| 38 static_assert( | 37 static_assert( |
| 39 !(INPUT_IS_TEXTUAL_BITCODE && PNACL_BROWSER_TRANSLATOR), | 38 !(INPUT_IS_TEXTUAL_BITCODE && PNACL_BROWSER_TRANSLATOR), |
| 40 "Can not define INPUT_IS_TEXTUAL_BITCODE when building browswer translator"); | 39 "Can not define INPUT_IS_TEXTUAL_BITCODE when building browswer translator"); |
| 41 | 40 |
| 42 // Define a SmallVector backed buffer as a data stream, so that it | 41 // Define a SmallVector backed buffer as a data stream, so that it |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 }); | 167 }); |
| 169 CompileThread.join(); | 168 CompileThread.join(); |
| 170 } else { | 169 } else { |
| 171 getCompiler().run(ExtraFlags, *Ctx.get(), std::move(InputStream)); | 170 getCompiler().run(ExtraFlags, *Ctx.get(), std::move(InputStream)); |
| 172 } | 171 } |
| 173 transferErrorCode(getReturnValue( | 172 transferErrorCode(getReturnValue( |
| 174 ExtraFlags, static_cast<ErrorCodes>(Ctx->getErrorStatus()->value()))); | 173 ExtraFlags, static_cast<ErrorCodes>(Ctx->getErrorStatus()->value()))); |
| 175 } | 174 } |
| 176 | 175 |
| 177 } // end of namespace Ice | 176 } // end of namespace Ice |
| OLD | NEW |