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

Side by Side Diff: src/IceCompileServer.cpp

Issue 1903553004: Subzero: Allow overriding command-line args from the browser. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code review changes Created 4 years, 8 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 | « src/IceClFlags.cpp ('k') | src/IceRangeSpec.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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 for (size_t i = 0; i < Len; ++i) 82 for (size_t i = 0; i < Len; ++i)
83 Buf[i] = BitcodeBuffer[Cursor + i]; 83 Buf[i] = BitcodeBuffer[Cursor + i];
84 Cursor += Len; 84 Cursor += Len;
85 return Len; 85 return Len;
86 } 86 }
87 87
88 std::unique_ptr<Ostream> makeStream(const std::string &Filename, 88 std::unique_ptr<Ostream> makeStream(const std::string &Filename,
89 std::error_code &EC) { 89 std::error_code &EC) {
90 if (Filename == "-") { 90 if (Filename == "-") {
91 return std::unique_ptr<Ostream>(new llvm::raw_os_ostream(std::cout)); 91 return std::unique_ptr<Ostream>(new llvm::raw_os_ostream(std::cout));
92 } else if (Filename == "/dev/stderr") {
93 return std::unique_ptr<Ostream>(new llvm::raw_os_ostream(std::cerr));
92 } else { 94 } else {
93 return std::unique_ptr<Ostream>( 95 return std::unique_ptr<Ostream>(
94 new llvm::raw_fd_ostream(Filename, EC, llvm::sys::fs::F_None)); 96 new llvm::raw_fd_ostream(Filename, EC, llvm::sys::fs::F_None));
95 } 97 }
96 } 98 }
97 99
98 ErrorCodes getReturnValue(ErrorCodes Val) { 100 ErrorCodes getReturnValue(ErrorCodes Val) {
99 if (getFlags().getAlwaysExitSuccess()) 101 if (getFlags().getAlwaysExitSuccess())
100 return EC_None; 102 return EC_None;
101 return Val; 103 return Val;
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 } else { 240 } else {
239 getCompiler().run(Flags, *Ctx.get(), std::move(InputStream)); 241 getCompiler().run(Flags, *Ctx.get(), std::move(InputStream));
240 } 242 }
241 transferErrorCode( 243 transferErrorCode(
242 getReturnValue(static_cast<ErrorCodes>(Ctx->getErrorStatus()->value()))); 244 getReturnValue(static_cast<ErrorCodes>(Ctx->getErrorStatus()->value())));
243 Ctx->dumpConstantLookupCounts(); 245 Ctx->dumpConstantLookupCounts();
244 Ctx->dumpStrings(); 246 Ctx->dumpStrings();
245 } 247 }
246 248
247 } // end of namespace Ice 249 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceClFlags.cpp ('k') | src/IceRangeSpec.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698