[PATCH] D42475: [ELF] Add warnings for various symbols that cannot be ordered
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 7 18:22:58 PST 2018
ruiu added inline comments.
================
Comment at: ELF/Driver.cpp:597
+
+ std::vector<StringRef> Ret;
+ DenseSet<StringRef> Names;
----------------
grimar wrote:
> I guess this can be `SetVector<StringRef>` and then something like below should work:
>
>
> ```
> SetVector<StringRef> Names;
> for (StringRef S : args::getLines(*MB))
> if (!Names.insert(S).second && Config->WarnSymbolOrdering)
> warn("symbol ordering file: symbol '" + S + "' specified multiple times");
> return Names.takeVector();
> ```
>
This is nice.
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D42475
More information about the llvm-commits
mailing list