[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:24:00 PDT 2015


On Thu, Sep 24, 2015 at 9:13 PM, Rui Ueyama <ruiu at google.com> wrote:
> 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?
>

That sounds a good idea. I'll take care of this.

Thanks,

--
Davide


More information about the llvm-commits mailing list