[PATCH] D35548: [mips] Teach the driver to accept -m(no-)gpopt.
Simon Atanasyan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 18 05:33:37 PDT 2017
atanasyan added inline comments.
================
Comment at: lib/Driver/ToolChains/Clang.cpp:1490
+ GPOpt->claim();
+ }
+
----------------
Could it be rewritten a bit shorter?
```
bool NoAbiCalls =
ABICalls && ABICalls->getOption().matches(options::OPT_mno_abicalls);
bool WantGPOpt = GPOpt && GPOpt->getOption().matches(options::OPT_mgpopt);
if (NoAbiCalls && (!GPOpt || WantGPOpt)) {
CmdArgs.push_back("-mllvm");
CmdArgs.push_back("-mgpopt=1");
} else {
CmdArgs.push_back("-mllvm");
CmdArgs.push_back("-mgpopt=0");
}
if (GPOpt)
GPOpt->claim();
```
https://reviews.llvm.org/D35548
More information about the cfe-commits
mailing list