[lld] r265213 - Call cl::ParseCommandLineOptions from the driver.
Sean Silva via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 1 21:08:02 PDT 2016
Author: silvas
Date: Fri Apr 1 23:08:02 2016
New Revision: 265213
URL: http://llvm.org/viewvc/llvm-project?rev=265213&view=rev
Log:
Call cl::ParseCommandLineOptions from the driver.
Thanks to Rui for the suggestion; this simplifies things.
Modified:
lld/trunk/ELF/Config.h
lld/trunk/ELF/Driver.cpp
lld/trunk/ELF/LTO.cpp
Modified: lld/trunk/ELF/Config.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Config.h?rev=265213&r1=265212&r2=265213&view=diff
==============================================================================
--- lld/trunk/ELF/Config.h (original)
+++ lld/trunk/ELF/Config.h Fri Apr 1 23:08:02 2016
@@ -91,7 +91,6 @@ struct Configuration {
uint16_t EMachine = llvm::ELF::EM_NONE;
uint64_t EntryAddr = -1;
unsigned LtoO;
- std::vector<const char *> MLlvm;
unsigned Optimize;
};
Modified: lld/trunk/ELF/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Driver.cpp?rev=265213&r1=265212&r2=265213&view=diff
==============================================================================
--- lld/trunk/ELF/Driver.cpp (original)
+++ lld/trunk/ELF/Driver.cpp Fri Apr 1 23:08:02 2016
@@ -309,9 +309,11 @@ void LinkerDriver::readConfigs(opt::Inpu
for (auto *Arg : Args.filtered(OPT_undefined))
Config->Undefined.push_back(Arg->getValue());
- Config->MLlvm.push_back("lld (LLVM option parsing)");
+ std::vector<const char *> Argv;
+ Argv.push_back("lld (LLVM option parsing)");
for (auto *Arg : Args.filtered(OPT_mllvm))
- Config->MLlvm.push_back(Arg->getValue());
+ Argv.push_back(Arg->getValue());
+ cl::ParseCommandLineOptions(Argv.size(), Argv.data());
}
void LinkerDriver::createFiles(opt::InputArgList &Args) {
Modified: lld/trunk/ELF/LTO.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/LTO.cpp?rev=265213&r1=265212&r2=265213&view=diff
==============================================================================
--- lld/trunk/ELF/LTO.cpp (original)
+++ lld/trunk/ELF/LTO.cpp Fri Apr 1 23:08:02 2016
@@ -143,8 +143,6 @@ std::unique_ptr<InputFile> BitcodeCompil
internalize(*GV);
}
- cl::ParseCommandLineOptions(Config->MLlvm.size(), Config->MLlvm.data());
-
if (Config->SaveTemps)
saveBCFile(Combined, ".lto.bc");
More information about the llvm-commits
mailing list