| 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 /// \file | 10 /// \file |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 #include "llvm/Support/raw_os_ostream.h" | 26 #include "llvm/Support/raw_os_ostream.h" |
| 27 #include "llvm/Support/Signals.h" | 27 #include "llvm/Support/Signals.h" |
| 28 #include "llvm/Support/SourceMgr.h" | 28 #include "llvm/Support/SourceMgr.h" |
| 29 #include "llvm/Support/StreamingMemoryObject.h" | 29 #include "llvm/Support/StreamingMemoryObject.h" |
| 30 #pragma clang diagnostic pop | 30 #pragma clang diagnostic pop |
| 31 | 31 |
| 32 #include <fstream> | 32 #include <fstream> |
| 33 #include <iostream> | 33 #include <iostream> |
| 34 #include <thread> | 34 #include <thread> |
| 35 | 35 |
| 36 #if defined(HAVE_UNISTD_H) |
| 37 # include <unistd.h> |
| 38 #endif |
| 39 #if defined(_MSC_VER) |
| 40 # include <io.h> |
| 41 # include <fcntl.h> |
| 42 #endif |
| 43 |
| 36 namespace Ice { | 44 namespace Ice { |
| 37 | 45 |
| 38 namespace { | 46 namespace { |
| 39 | 47 |
| 40 // Define a SmallVector backed buffer as a data stream, so that it can hold the | 48 // Define a SmallVector backed buffer as a data stream, so that it can hold the |
| 41 // generated binary version of the textual bitcode in the input file. | 49 // generated binary version of the textual bitcode in the input file. |
| 42 class TextDataStreamer : public llvm::DataStreamer { | 50 class TextDataStreamer : public llvm::DataStreamer { |
| 43 public: | 51 public: |
| 44 TextDataStreamer() = default; | 52 TextDataStreamer() = default; |
| 45 ~TextDataStreamer() final = default; | 53 ~TextDataStreamer() final = default; |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 }); | 208 }); |
| 201 CompileThread.join(); | 209 CompileThread.join(); |
| 202 } else { | 210 } else { |
| 203 getCompiler().run(ExtraFlags, *Ctx.get(), std::move(InputStream)); | 211 getCompiler().run(ExtraFlags, *Ctx.get(), std::move(InputStream)); |
| 204 } | 212 } |
| 205 transferErrorCode(getReturnValue( | 213 transferErrorCode(getReturnValue( |
| 206 ExtraFlags, static_cast<ErrorCodes>(Ctx->getErrorStatus()->value()))); | 214 ExtraFlags, static_cast<ErrorCodes>(Ctx->getErrorStatus()->value()))); |
| 207 } | 215 } |
| 208 | 216 |
| 209 } // end of namespace Ice | 217 } // end of namespace Ice |
| OLD | NEW |