[PATCH] D48298: [ELF] Uniquify --wrap list.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 19 02:52:19 PDT 2018


grimar added a comment.

In https://reviews.llvm.org/D48298#1136277, @bd1976llvm wrote:

> I would propose adding the ability to retrieve a unique filtered list of arguments.
>
>   for (StringRef Name : Args.getAllUniqueArgValues(OPT_wrap))
>     Symtab->addSymbolWrap<ELFT>(Name);
>   
>
> Relevant for other options: --defsym, --trace-symbol, --undefined etc..


I am not sure it is useful for other options we have, but it perhaps can be a nice refactoring for this particular case.

For example, I am not sure we should use it for --defsym, as in theory it can have different values: `--defsym=foo=1 ... --defsym=foo=2`.
It is OK to process all of them one by one like we do now. The same applies for --trace-symbol and --undefined - there is no issue to process them one by one.
I would not overcomplicate the current code for these cases until it is proven to be a useful change.


Repository:
  rL LLVM

https://reviews.llvm.org/D48298





More information about the llvm-commits mailing list