Page MenuHomePhabricator

[Debug-Info][NFC] add a wrapper for Die.addValue
ClosedPublic

Authored by shchenz on Apr 22 2021, 7:16 PM.

Details

Summary

Add a new wrapper function addAttribute() for Die.addValue() function, so we can do some attributes control in one single interface.
This is used for strict dwarf in patch D101024

Diff Detail

Event Timeline

shchenz created this revision.Apr 22 2021, 7:16 PM
shchenz requested review of this revision.Apr 22 2021, 7:16 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 22 2021, 7:16 PM
dblaikie added inline comments.Apr 22 2021, 7:38 PM
llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h
79

I'd prefer 'typename' rather than 'class' here (since that's what templates really take - types of any kind, not only classes). I think LLVM probably leans that way generally.

82

Perhaps this function could use the DIEValueAllocator member directly, rather than having to pass it in - since all the callers pass the same value?

shchenz updated this revision to Diff 339861.Apr 22 2021, 8:43 PM
shchenz marked an inline comment as done.

1: address @dblaikie comments

llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h
82

Good idea.

dblaikie accepted this revision.Apr 22 2021, 8:49 PM

Looks good, thanks!

This revision is now accepted and ready to land.Apr 22 2021, 8:49 PM
This revision was landed with ongoing or failed builds.May 7 2021, 12:24 AM
This revision was automatically updated to reflect the committed changes.