This is an archive of the discontinued LLVM Phabricator instance.

[CodeView] Fix incorrect CodeView encoding of signed integer constants
ClosedPublic

Authored by smerritt on Jun 3 2022, 7:54 AM.

Details

Summary

Add proper CodeView encoding for positive constant integer values greater than 127. In addition, use the two byte encoding form for positive values less than LF_NUMERIC.

Diff Detail

Event Timeline

smerritt created this revision.Jun 3 2022, 7:54 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 3 2022, 7:54 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
smerritt requested review of this revision.Jun 3 2022, 7:54 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 3 2022, 7:54 AM
rnk accepted this revision.Jun 3 2022, 10:37 AM

lgtm, thanks

llvm/lib/DebugInfo/CodeView/CodeViewRecordIO.cpp
281–283

Is this FIXME addressed? If so, we should remove it.

This revision is now accepted and ready to land.Jun 3 2022, 10:37 AM
smerritt added inline comments.Jun 3 2022, 10:56 AM
llvm/lib/DebugInfo/CodeView/CodeViewRecordIO.cpp
281–283

Unfortunately no, the new test I added exercises the writeEncodedSignedInteger routine but I did not find a case to exercise this routine. I updated the code here to keep the routines in sync.

smerritt updated this revision to Diff 434442.Jun 6 2022, 5:39 AM

Fix a clang-format error (extra space).