[all-commits] [llvm/llvm-project] c720b1: [ELF] Use SmallVector for SharedFile and simplify ...

Fangrui Song via All-commits all-commits at lists.llvm.org
Tue Dec 14 21:11:59 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c720b16aa56b2a3904864d5eda19f1edd301eff4
      https://github.com/llvm/llvm-project/commit/c720b16aa56b2a3904864d5eda19f1edd301eff4
  Author: Fangrui Song <i at maskray.me>
  Date:   2021-12-14 (Tue, 14 Dec 2021)

  Changed paths:
    M lld/ELF/InputFiles.cpp
    M lld/ELF/InputFiles.h

  Log Message:
  -----------
  [ELF] Use SmallVector for SharedFile and simplify parseVerdefs

SHT_GNU_verdef is typically small, so it's unnecessary to reserve the vector.

While here, fix a hypothetical issue when SHT_GNU_verdef has non-increasing
version indexes, which don't happen with GNU ld, gold, ld.lld's output.

My x86-64 lld executable is 256 bytes smaller.




More information about the All-commits mailing list