[PATCH] D96055: [DebugInfo] Emit comments for debug_loc bytes as integers

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 6 14:39:36 PST 2021


dblaikie added a comment.

Perhaps we shouldn't use a comment here? It doesn't seem to add any value - duplicating the literal that's already readable. (ideally we could pass down a comment from a higher level with more semantic information - like the `DW_OP_implicit_value comment`.

I'd say removing this `Twine` creation, passing down an empty string would suffice here. If you'd like to add value/maybe in a separate commit, adding an optional `Comment` parameter to `emitUnsigned` and `emitData1` and using that from in this case `DwarfExpression::addConstantFP` to pass down something like `emitUnsigned(NumBytes, )` and then maybe on the first call to `emitData1` a comment with the APF and the original (unswapped) API values, and some text saying that this is the start of a ULEB encoding of the API value, LSB first.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96055/new/

https://reviews.llvm.org/D96055



More information about the llvm-commits mailing list