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

Unified Diff: src/IceBrowserCompileServer.cpp

Issue 1848303003: Simplify references to command line flags. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix nits. Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/IceBrowserCompileServer.h ('k') | src/IceCfg.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceBrowserCompileServer.cpp
diff --git a/src/IceBrowserCompileServer.cpp b/src/IceBrowserCompileServer.cpp
index 6baf62dec1bf13b6a70bb37bc619864c42db5009..3b9dc3fa993e5a91691b6945184adf78d703e356 100644
--- a/src/IceBrowserCompileServer.cpp
+++ b/src/IceBrowserCompileServer.cpp
@@ -165,14 +165,13 @@ void BrowserCompileServer::run() {
void BrowserCompileServer::getParsedFlags(uint32_t NumThreads, int argc,
char **argv) {
ClFlags::parseFlags(argc, argv);
- ClFlags::getParsedClFlags(*Flags);
+ ClFlags::getParsedClFlags(ClFlags::Flags);
// Set some defaults which aren't specified via the argv string.
- Flags->setNumTranslationThreads(NumThreads);
- Flags->setUseSandboxing(true);
- Flags->setOutFileType(FT_Elf);
- Flags->setTargetArch(getTargetArch());
- Flags->setBuildOnRead(true);
- Flags->setInputFileFormat(llvm::PNaClFormat);
+ ClFlags::Flags.setNumTranslationThreads(NumThreads);
+ ClFlags::Flags.setUseSandboxing(true);
+ ClFlags::Flags.setOutFileType(FT_Elf);
+ ClFlags::Flags.setTargetArch(getTargetArch());
+ ClFlags::Flags.setInputFileFormat(llvm::PNaClFormat);
}
bool BrowserCompileServer::pushInputBytes(const void *Data, size_t NumBytes) {
@@ -219,7 +218,7 @@ void BrowserCompileServer::startCompileThread(int ObjFD) {
CompileThread = std::thread([this]() {
llvm::install_fatal_error_handler(fatalErrorHandler, this);
Ctx->initParserThread();
- this->getCompiler().run(*Flags, *Ctx.get(),
+ this->getCompiler().run(ClFlags::Flags, *Ctx.get(),
// Retain original reference, but the compiler
// (LLVM's MemoryObject) wants to handle deletion.
std::unique_ptr<llvm::DataStreamer>(InputStream));
« no previous file with comments | « src/IceBrowserCompileServer.h ('k') | src/IceCfg.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698