| 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 {"dump", BuildDefs::dump()}, | 149 {"dump", BuildDefs::dump()}, |
| 150 {"llvm_cl", BuildDefs::llvmCl()}, | 150 {"llvm_cl", BuildDefs::llvmCl()}, |
| 151 {"llvm_ir", BuildDefs::llvmIr()}, | 151 {"llvm_ir", BuildDefs::llvmIr()}, |
| 152 {"llvm_ir_as_input", BuildDefs::llvmIrAsInput()}, | 152 {"llvm_ir_as_input", BuildDefs::llvmIrAsInput()}, |
| 153 {"minimal_build", BuildDefs::minimal()}, | 153 {"minimal_build", BuildDefs::minimal()}, |
| 154 {"browser_mode", BuildDefs::browser()}}; | 154 {"browser_mode", BuildDefs::browser()}}; |
| 155 | 155 |
| 156 /// Dumps values of build attributes to Stream if Stream is non-null. | 156 /// Dumps values of build attributes to Stream if Stream is non-null. |
| 157 void dumpBuildAttributes(Ostream &Str) { | 157 void dumpBuildAttributes(Ostream &Str) { |
| 158 // List the supported targets. | 158 // List the supported targets. |
| 159 #define SUBZERO_TARGET(TARGET) Str << "target_" #TARGET << "\n"; | 159 #define SUBZERO_TARGET(TARGET) Str << "target_" XSTRINGIFY(TARGET) "\n"; |
| 160 #include "SZTargets.def" | 160 #include "SZTargets.def" |
| 161 const char *Prefix[2] = {"no", "allow"}; | 161 const char *Prefix[2] = {"no", "allow"}; |
| 162 for (size_t i = 0; i < llvm::array_lengthof(ConditionalBuildAttributes); | 162 for (size_t i = 0; i < llvm::array_lengthof(ConditionalBuildAttributes); |
| 163 ++i) { | 163 ++i) { |
| 164 const auto &A = ConditionalBuildAttributes[i]; | 164 const auto &A = ConditionalBuildAttributes[i]; |
| 165 Str << Prefix[A.FlagValue] << "_" << A.FlagName << "\n"; | 165 Str << Prefix[A.FlagValue] << "_" << A.FlagName << "\n"; |
| 166 } | 166 } |
| 167 Str << "revision_" << getSubzeroRevision() << "\n"; | 167 Str << "revision_" << getSubzeroRevision() << "\n"; |
| 168 } | 168 } |
| 169 | 169 |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 } else { | 263 } else { |
| 264 getCompiler().run(Flags, *Ctx.get(), std::move(InputStream)); | 264 getCompiler().run(Flags, *Ctx.get(), std::move(InputStream)); |
| 265 } | 265 } |
| 266 transferErrorCode( | 266 transferErrorCode( |
| 267 getReturnValue(static_cast<ErrorCodes>(Ctx->getErrorStatus()->value()))); | 267 getReturnValue(static_cast<ErrorCodes>(Ctx->getErrorStatus()->value()))); |
| 268 Ctx->dumpConstantLookupCounts(); | 268 Ctx->dumpConstantLookupCounts(); |
| 269 Ctx->dumpStrings(); | 269 Ctx->dumpStrings(); |
| 270 } | 270 } |
| 271 | 271 |
| 272 } // end of namespace Ice | 272 } // end of namespace Ice |
| OLD | NEW |