The DebugLocDwarfExpression::emitData1() function would emit the
assembly file comments using raw characters. As emitting non-printable
characters or characters >127 can lead to issues, just emit the comments
as integers instead.
Details
Diff Detail
Unit Tests
Event Timeline
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.