This is an archive of the discontinued LLVM Phabricator instance.

[lld-macho][nfc] Test that -ObjC will import bitcode with category sections
ClosedPublic

Authored by int3 on Mar 23 2021, 1:46 PM.

Details

Summary

The functionality was originally added in D95265: [lld-macho] Force-loading should share code path with regular archive loads, 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: [lld-macho] LTO: Unset VisibleToRegularObj where possible, which will hide irrelevant
bitcode symbols.

Diff Detail

Event Timeline

int3 created this revision.Mar 23 2021, 1:46 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 23 2021, 1:46 PM
int3 requested review of this revision.Mar 23 2021, 1:46 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 23 2021, 1:46 PM
oontvoo accepted this revision.Mar 30 2021, 9:30 AM
oontvoo added a subscriber: oontvoo.

Looks fairly straightforward to me

This revision is now accepted and ready to land.Mar 30 2021, 9:30 AM