[PATCH] D27578: Change the implementation of --dynamic-list to use linker script parsing
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 8 09:33:54 PST 2016
ruiu added inline comments.
================
Comment at: ELF/Driver.cpp:634
- if (auto *Arg = Args.getLastArg(OPT_dynamic_list))
+ if (auto *Arg = Args.getLastArg(OPT_dynamic_list)) {
if (Optional<MemoryBufferRef> Buffer = readFile(Arg->getValue()))
----------------
Remove `{`
================
Comment at: ELF/Driver.cpp:643-651
for (auto *Arg : Args.filtered(OPT_export_dynamic_symbol))
- Config->DynamicList.push_back(Arg->getValue());
+ Config->VersionScriptGlobals.push_back({Arg->getValue(), false, false});
+
+ if (Args.getLastArg(OPT_dynamic_list) ||
+ Args.getLastArg(OPT_export_dynamic_symbol)) {
+ Config->ExportDynamic = true;
+ if (!Config->Shared)
----------------
This needs a comment.
================
Comment at: ELF/Driver.cpp:644
for (auto *Arg : Args.filtered(OPT_export_dynamic_symbol))
- Config->DynamicList.push_back(Arg->getValue());
+ Config->VersionScriptGlobals.push_back({Arg->getValue(), false, false});
+
----------------
What are `false` and `false`? Please add a comment.
================
Comment at: ELF/Driver.cpp:646-647
+
+ if (Args.getLastArg(OPT_dynamic_list) ||
+ Args.getLastArg(OPT_export_dynamic_symbol)) {
+ Config->ExportDynamic = true;
----------------
Use `hasArg`.
https://reviews.llvm.org/D27578
More information about the llvm-commits
mailing list