[PATCH] D95998: [Debug-Info] [NFC] use emitDwarfUnitLength to handle debug line section unit length field
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 18 14:51:21 PST 2021
dblaikie added a comment.
In D95998#2568193 <https://reviews.llvm.org/D95998#2568193>, @ikudrin wrote:
> In D95998#2567599 <https://reviews.llvm.org/D95998#2567599>, @dblaikie wrote:
>
>> What if the function created and returned Hi rather than taking it as an argument?
>
> Hmm, I can't say I'm a vivid fan of this change. All methods of `MCStremer` instruct it to do something, i.e. it roles as just a performer. With this change, it now requests a caller to do some action. It looks like inverting customer vs. performer roles for this particular case.
In the sense that it now requests the user emit the end label at some point?
It seems pretty tidy to me, and I'm pretty sure we follow this pattern elsewhere in the CodeGen/AsmPrinter code. "Start a length-prefixed region" and provides the label for the caller to mark the end of that region doesn't seem like a fundamentally strange or surprising API design.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95998/new/
https://reviews.llvm.org/D95998
More information about the llvm-commits
mailing list