This is an archive of the discontinued LLVM Phabricator instance.

[MC] Make MCDwarfLineStr class public
ClosedPublic

Authored by maksfb on Sep 7 2021, 7:29 PM.

Details

Summary

Add MCDwarfLineStr class to the public API.

Note that MCDwarfLineTableHeader::Emit(), takes MCDwarfLineStr as
an Optional<> parameter making it impossible to use the API if the class
is not publicly defined.

Diff Detail

Event Timeline

maksfb created this revision.Sep 7 2021, 7:29 PM
maksfb requested review of this revision.Sep 7 2021, 7:29 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 7 2021, 7:29 PM
maksfb updated this revision to Diff 371695.Sep 9 2021, 12:41 PM

Friendly ping.

Personally patch makes sense. It's inline with all other classes that are exposed, and it's needed for tools that use MC and are working with DWARF 5.

Perhaps a unit test demonstrating the sort of thing you want to use this API for?

 Note that MCDwarfLineTableHeader::Emit(), takes MCDwarfLineStr as an Optional<> parameter making it impossible to use the API if the class is not publicly defined.

Presumably you could still pass None to such an API? But yeah, couldn't use whatever functionality is exposed by passing a non-None value.

maksfb added a comment.Sep 9 2021, 6:13 PM

 Note that MCDwarfLineTableHeader::Emit(), takes MCDwarfLineStr as an Optional<> parameter making it impossible to use the API if the class is not publicly defined.

Presumably you could still pass None to such an API? But yeah, couldn't use whatever functionality is exposed by passing a non-None value.

I couldn't make None work. Still, would like to have the support for DWARF v5 and will need this interface.

rafauler updated this revision to Diff 374408.Sep 22 2021, 5:34 PM
rafauler added a subscriber: rafauler.

Unit test

rafauler updated this revision to Diff 374409.Sep 22 2021, 5:47 PM

Fix comments and unnecessary changes to CMakeLists.txt

Thank you for adding the unit test, @rafaelauler! How does it look, @dblaikie?

Friendly ping.

This revision is now accepted and ready to land.Sep 29 2021, 1:50 PM
This revision was landed with ongoing or failed builds.Sep 30 2021, 12:32 PM
Closed by commit rG050edef8538e: [MC] Make MCDwarfLineStr class public (authored by maksfb, committed by rafauler). · Explain Why
This revision was automatically updated to reflect the committed changes.