[lld-macho] Parse re-exports of nested TAPI documents
authorJez Ng <jezng@fb.com>
Thu, 3 Jun 2021 01:53:44 +0000 (21:53 -0400)
committerJez Ng <jezng@fb.com>
Thu, 3 Jun 2021 16:02:30 +0000 (12:02 -0400)
commit6881f29a36a97102e5c89653a343f656231bc2f2
tree5794eb957a7aeafd50cde8cccfb153d6de7d0dc9
parent6f605b8d0bc1c19dccc7a6c248b4fa60e6f7fde3
[lld-macho] Parse re-exports of nested TAPI documents

D103423 neglected to call `parseReexports()` for nested TBD
documents, leading to symbol resolution failures when trying to look up
a symbol nested more than one level deep in a TBD file. This fixes the
regression and adds a test.

It also appears that `umbrella` wasn't being set properly when calling
`parseLoadCommands` -- it's supposed to resolve to `this` if `nullptr`
is passed. I didn't write a failing test case for this but I've made
`umbrella` a member so the previous behavior should be preserved.

Reviewed By: #lld-macho, thakis

Differential Revision: https://reviews.llvm.org/D103586
lld/MachO/DriverUtils.cpp
lld/MachO/InputFiles.cpp
lld/MachO/InputFiles.h
lld/test/MachO/tapi-link.s