This is an archive of the discontinued LLVM Phabricator instance.

[DWARFLinkerParallel] Add interface files, create a skeleton implementation.
ClosedPublic

Authored by avl on Apr 10 2023, 10:07 AM.

Details

Summary

This patch creates skeleton implementation for the DWARFLinkerParallel.
It also integrates DWARFLinkerParallel into dsymutil and llvm-dwarfutil,
so that empty DWARFLinker::link() can be called. To do this new command
line option is added "--linker apple/llvm". Additionally it changes
existing DWARFLinker interfaces/implementations to be compatible:
use Error for error reporting for the DWARFStreamer, make DWARFFile to
owner of referenced resources, other small refactorings. This patch is extracted from D96035.

Depends on D147455

Diff Detail

Event Timeline

avl created this revision.Apr 10 2023, 10:07 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 10 2023, 10:07 AM
avl requested review of this revision.Apr 10 2023, 10:07 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 10 2023, 10:07 AM
avl edited the summary of this revision. (Show Details)Apr 10 2023, 10:13 AM
avl updated this revision to Diff 523080.May 17 2023, 9:17 AM

rebased.

JDevlieghere accepted this revision.May 18 2023, 7:22 AM

LGTM modulo inline comments. They're all nits so feel free to land this once they've been addressed.

llvm/include/llvm/DWARFLinkerParallel/DWARFFile.h
23–24
llvm/include/llvm/DWARFLinkerParallel/DWARFLinker.h
43–49
56–57
61–65
69–72
91–92
llvm/tools/dsymutil/DwarfLinkerForBinary.cpp
557

Can we add a meaningful error string?

594

This probably needs an unreachable to make (older versions) of gcc happy.

llvm_unreachable("All cases handled above!");
llvm/tools/dsymutil/dsymutil.cpp
248–254

Let's remove these newlines to be consistent with the existing code surrounding it.

This revision is now accepted and ready to land.May 18 2023, 7:22 AM
avl updated this revision to Diff 528119.Jun 3 2023, 10:22 AM

addressed comments.

avl added a comment.Jun 4 2023, 4:03 AM

Thank you for the review!