[PATCH] D42733: [ELF] - Use InitTargetOptionsFromCodeGenFlags/ParseCommandLineOptions for parsing LTO options.
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 2 12:57:30 PST 2018
ruiu added inline comments.
================
Comment at: ELF/Driver.cpp:587
// Initializes Config members by the command line options.
-void LinkerDriver::readConfigs(opt::InputArgList &Args) {
+void LinkerDriver::readConfigs(const char *Argv0, opt::InputArgList &Args) {
Config->AllowMultipleDefinition =
----------------
We have `Config->Argv`, so you don't need to pass Argv0 around.
================
Comment at: ELF/Driver.cpp:697-698
+ !S.startswith("-pass-through="))
+ // Ignore options that might be passed by GCC and collect
+ // LTO options for futher proccessing.
+ LTOOptions.push_back(S.data());
----------------
I don't think you need this comment. This comment doesn't seem to make much sense to me because you are not ignoring options but collecting options in this `else if` clause. I'd just remove this comment.
https://reviews.llvm.org/D42733
More information about the llvm-commits
mailing list