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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 {"llvm_cl", BuildDefs::llvmCl()}, | 135 {"llvm_cl", BuildDefs::llvmCl()}, |
136 {"llvm_ir", BuildDefs::llvmIr()}, | 136 {"llvm_ir", BuildDefs::llvmIr()}, |
137 {"llvm_ir_as_input", BuildDefs::llvmIrAsInput()}, | 137 {"llvm_ir_as_input", BuildDefs::llvmIrAsInput()}, |
138 {"minimal_build", BuildDefs::minimal()}, | 138 {"minimal_build", BuildDefs::minimal()}, |
139 {"browser_mode", BuildDefs::browser()}}; | 139 {"browser_mode", BuildDefs::browser()}}; |
140 | 140 |
141 /// Dumps values of build attributes to Stream if Stream is non-null. | 141 /// Dumps values of build attributes to Stream if Stream is non-null. |
142 void dumpBuildAttributes(Ostream &Str) { | 142 void dumpBuildAttributes(Ostream &Str) { |
143 // List the supported targets. | 143 // List the supported targets. |
144 #define SUBZERO_TARGET(TARGET) Str << "target_" #TARGET << "\n"; | 144 #define SUBZERO_TARGET(TARGET) Str << "target_" #TARGET << "\n"; |
145 #include "llvm/Config/SZTargets.def" | 145 #include "SZTargets.def" |
146 const char *Prefix[2] = {"no", "allow"}; | 146 const char *Prefix[2] = {"no", "allow"}; |
147 for (size_t i = 0; i < llvm::array_lengthof(ConditionalBuildAttributes); | 147 for (size_t i = 0; i < llvm::array_lengthof(ConditionalBuildAttributes); |
148 ++i) { | 148 ++i) { |
149 const auto &A = ConditionalBuildAttributes[i]; | 149 const auto &A = ConditionalBuildAttributes[i]; |
150 Str << Prefix[A.FlagValue] << "_" << A.FlagName << "\n"; | 150 Str << Prefix[A.FlagValue] << "_" << A.FlagName << "\n"; |
151 } | 151 } |
152 } | 152 } |
153 | 153 |
154 } // end of anonymous namespace | 154 } // end of anonymous namespace |
155 | 155 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 CompileThread.join(); | 236 CompileThread.join(); |
237 } else { | 237 } else { |
238 getCompiler().run(ExtraFlags, *Ctx.get(), std::move(InputStream)); | 238 getCompiler().run(ExtraFlags, *Ctx.get(), std::move(InputStream)); |
239 } | 239 } |
240 transferErrorCode( | 240 transferErrorCode( |
241 getReturnValue(static_cast<ErrorCodes>(Ctx->getErrorStatus()->value()))); | 241 getReturnValue(static_cast<ErrorCodes>(Ctx->getErrorStatus()->value()))); |
242 Ctx->dumpConstantLookupCounts(); | 242 Ctx->dumpConstantLookupCounts(); |
243 } | 243 } |
244 | 244 |
245 } // end of namespace Ice | 245 } // end of namespace Ice |
OLD | NEW |