[lld] r248133 - [ELF2] Implement support for -discard-locals.
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 20 15:07:15 PDT 2015
On Sun, Sep 20, 2015 at 2:58 PM, Davide Italiano via llvm-commits
<llvm-commits at lists.llvm.org> wrote:
> Author: davide
> Date: Sun Sep 20 16:58:12 2015
> New Revision: 248133
>
> URL: http://llvm.org/viewvc/llvm-project?rev=248133&view=rev
> Log:
> [ELF2] Implement support for -discard-locals.
>
> This is not on by default, but it may make sense to change it in future.
> uint32_t SecIndex = Sym.st_shndx;
> ErrorOr<StringRef> SymName = Sym.getName(File.getStringTable());
> + if (Config->DiscardLocals && SymName->startswith(".L"))
I really don't like exposing details to consumers -- so I think
SymName->startswith(".L") can be replaced by Sym->isTemporaryLocal()
or something like that. Are always temporary locals defined as symbols
which name starts with ".L" or are there archs/ABIs that have a
different definition?
--
Davide
More information about the llvm-commits
mailing list