[lld-macho][nfc] Test that -ObjC will import bitcode with category sections
authorJez Ng <jezng@fb.com>
Wed, 31 Mar 2021 19:48:14 +0000 (15:48 -0400)
committerJez Ng <jezng@fb.com>
Wed, 31 Mar 2021 19:48:36 +0000 (15:48 -0400)
commit09aed384ba19ff8b74763bdc42467232c9c012b3
tree526b3e328c573d6f9384c7755b0b10f06f0ebee4
parent4ced958dc205de0de935e6d2f27767ebcec6c29f
[lld-macho][nfc] Test that -ObjC will import bitcode with category sections

The functionality was originally added in {D95265}, but the test in that
diff only checked if `-ObjC` would cause bitcode containing ObjC class
symbols to be loaded. It neglected to test for bitcode containing
categories but no class symbols.

This diff also changes the lto-archive.ll test to use `-why_load`
instead of inspecting the output binary's symbol table. This is
motivated by the stacked diff {D99105}, which will hide irrelevant
bitcode symbols.

Reviewed By: #lld-macho, oontvoo

Differential Revision: https://reviews.llvm.org/D99215
lld/test/MachO/lto-archive.ll