Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(278)

Side by Side Diff: src/IceCompileServer.cpp

Issue 2306273002: Subzero: Fix target attribute when SZTARGET is defined. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Use string concatenation. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/IceDefs.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | src/IceDefs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698