[all-commits] [llvm/llvm-project] c15b58: [lld/mac] Don't assert during thunk insertion if t...

Nico Weber via All-commits all-commits at lists.llvm.org
Fri Sep 3 09:23:04 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c15b5888527bce7c794270d76484068ff3dc73a4
      https://github.com/llvm/llvm-project/commit/c15b5888527bce7c794270d76484068ff3dc73a4
  Author: Nico Weber <thakis at chromium.org>
  Date:   2021-09-03 (Fri, 03 Sep 2021)

  Changed paths:
    M lld/MachO/Writer.cpp
    A lld/test/MachO/invalid/arm64-thunk-undefined.s

  Log Message:
  -----------
  [lld/mac] Don't assert during thunk insertion if there are undefined symbols

We end up calling resolveBranchVA(), which asserts for Undefineds.

As fix, just return early in Writer::run() if there are any diagnostics
after processing relocations (which is where undefined symbol errors are
emitted). This matches what the ELF port does.

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




More information about the All-commits mailing list