[PATCH] D13153: [ELF2] Use static non-member function when it suffices

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 24 21:08:20 PDT 2015


On Thu, Sep 24, 2015 at 8:55 PM, Shankar Easwaran via llvm-commits
<llvm-commits at lists.llvm.org> wrote:
> shankare added a subscriber: shankare.
>
> ================
> Comment at: ELF/Writer.cpp:339-340
> @@ -338,4 +338,4 @@
>          ErrorOr<StringRef> SymName = Sym.getName(File.getStringTable());
> -        if (SymName && SymTabSec.shouldKeepInSymtab(*SymName))
> +        if (SymName && shouldKeepInSymtab(*SymName))
>            SymTabSec.addSymbol(*SymName, true);
>        }
> ----------------
> what if discard all and discard none is used ? Do we plan to print any warning of what option was chosen ?
>

discard-all "wins". This is also what ld.bfd does, FWIW, and it also
doesn't emit any warning about it.
I didn't have a warning in mind but if there's a request + consensus
I'm not strongly opposed to adding it (at some point).

-- 
Davide

"There are no solved problems; there are only problems that are more
or less solved" -- Henri Poincare


More information about the llvm-commits mailing list