[all-commits] [llvm/llvm-project] de266c: [lld/mac] Don't assert when using -exported_symbol...

Nico Weber via All-commits all-commits at lists.llvm.org
Sat Apr 24 07:22:14 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: de266ce4f9f2dfc989d2f9f82017229be5f535eb
      https://github.com/llvm/llvm-project/commit/de266ce4f9f2dfc989d2f9f82017229be5f535eb
  Author: Nico Weber <thakis at chromium.org>
  Date:   2021-04-24 (Sat, 24 Apr 2021)

  Changed paths:
    M lld/MachO/SyntheticSections.cpp
    M lld/test/MachO/export-options.s

  Log Message:
  -----------
  [lld/mac] Don't assert when using -exported_symbol with private symbol

When I added this assert in D93609, it asserted that a symbol that
is privateExtern is also isExternal().

In D98381 the privateExtern check moved into shouldExportSymbol()
but the assert didn't -- now it checked that _every_ non-exported
symbol is isExternal(), which isn't true. Move the assert into the
privateExtern check where it used to be.

Fixes PR50098.

Differential Revision: https://reviews.llvm.org/D101223




More information about the All-commits mailing list