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

Side by Side Diff: src/IceCompileServer.cpp

Issue 1197863003: Subzero: Reduce the amount of #ifdef'd code. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Use constexpr inline functions instead of macros Created 5 years, 6 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
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 // This file defines the basic commandline-based compile server. 10 // This file defines the basic commandline-based compile server.
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 91
92 ErrorCodes getReturnValue(const Ice::ClFlagsExtra &Flags, ErrorCodes Val) { 92 ErrorCodes getReturnValue(const Ice::ClFlagsExtra &Flags, ErrorCodes Val) {
93 if (Flags.getAlwaysExitSuccess()) 93 if (Flags.getAlwaysExitSuccess())
94 return EC_None; 94 return EC_None;
95 return Val; 95 return Val;
96 } 96 }
97 97
98 } // end of anonymous namespace 98 } // end of anonymous namespace
99 99
100 void CLCompileServer::run() { 100 void CLCompileServer::run() {
101 if (ALLOW_DUMP) { 101 if (buildAllowsDump()) {
102 llvm::sys::PrintStackTraceOnErrorSignal(); 102 llvm::sys::PrintStackTraceOnErrorSignal();
103 } 103 }
104 ClFlags::parseFlags(argc, argv); 104 ClFlags::parseFlags(argc, argv);
105 ClFlags Flags; 105 ClFlags Flags;
106 ClFlagsExtra ExtraFlags; 106 ClFlagsExtra ExtraFlags;
107 ClFlags::getParsedClFlags(Flags); 107 ClFlags::getParsedClFlags(Flags);
108 ClFlags::getParsedClFlagsExtra(ExtraFlags); 108 ClFlags::getParsedClFlagsExtra(ExtraFlags);
109 109
110 std::error_code EC; 110 std::error_code EC;
111 std::unique_ptr<Ostream> Ls = makeStream(ExtraFlags.getLogFilename(), EC); 111 std::unique_ptr<Ostream> Ls = makeStream(ExtraFlags.getLogFilename(), EC);
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 }); 168 });
169 CompileThread.join(); 169 CompileThread.join();
170 } else { 170 } else {
171 getCompiler().run(ExtraFlags, *Ctx.get(), std::move(InputStream)); 171 getCompiler().run(ExtraFlags, *Ctx.get(), std::move(InputStream));
172 } 172 }
173 transferErrorCode(getReturnValue( 173 transferErrorCode(getReturnValue(
174 ExtraFlags, static_cast<ErrorCodes>(Ctx->getErrorStatus()->value()))); 174 ExtraFlags, static_cast<ErrorCodes>(Ctx->getErrorStatus()->value())));
175 } 175 }
176 176
177 } // end of namespace Ice 177 } // end of namespace Ice
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698