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 16 matching lines...) Expand all Loading... |
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) | 36 #if defined(HAVE_UNISTD_H) |
37 # include <unistd.h> | 37 #include <unistd.h> |
38 #endif | 38 #endif |
39 #if defined(_MSC_VER) | 39 #if defined(_MSC_VER) |
40 # include <io.h> | 40 #include <io.h> |
41 # include <fcntl.h> | 41 #include <fcntl.h> |
42 #endif | 42 #endif |
43 | 43 |
44 namespace Ice { | 44 namespace Ice { |
45 | 45 |
46 namespace { | 46 namespace { |
47 | 47 |
48 // 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 |
49 // generated binary version of the textual bitcode in the input file. | 49 // generated binary version of the textual bitcode in the input file. |
50 class TextDataStreamer : public llvm::DataStreamer { | 50 class TextDataStreamer : public llvm::DataStreamer { |
51 public: | 51 public: |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 }); | 207 }); |
208 CompileThread.join(); | 208 CompileThread.join(); |
209 } else { | 209 } else { |
210 getCompiler().run(ExtraFlags, *Ctx.get(), std::move(InputStream)); | 210 getCompiler().run(ExtraFlags, *Ctx.get(), std::move(InputStream)); |
211 } | 211 } |
212 transferErrorCode(getReturnValue( | 212 transferErrorCode(getReturnValue( |
213 ExtraFlags, static_cast<ErrorCodes>(Ctx->getErrorStatus()->value()))); | 213 ExtraFlags, static_cast<ErrorCodes>(Ctx->getErrorStatus()->value()))); |
214 } | 214 } |
215 | 215 |
216 } // end of namespace Ice | 216 } // end of namespace Ice |
OLD | NEW |