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

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 24 21:13:05 PDT 2015


On Thu, Sep 24, 2015 at 9:08 PM, Davide Italiano <davide at freebsd.org> wrote:

> 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).
>

I agree that we don't have to print out an error message at least now. But
I'm thinking that if these options are exclusive, shouldn't we define enums
for {none,locals,all} instead of having three separate flags in Config?


>
> --
> Davide
>
> "There are no solved problems; there are only problems that are more
> or less solved" -- Henri Poincare
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150924/5c5e5265/attachment.html>


More information about the llvm-commits mailing list