This is an archive of the discontinued LLVM Phabricator instance.

Fix a bug in the character runtime
ClosedPublic

Authored by rovka on Apr 27 2021, 4:31 AM.

Details

Summary

The number of bytes copied in CopyAndPad should depend on the size of
the type being copied, not on its shift value (which in the case of char
is 0, leading to no bytes at all being copied).

Add unit tests for CharacterMin and CharacterMax, which exercise this
code path.

Diff Detail

Event Timeline

rovka requested review of this revision.Apr 27 2021, 4:31 AM
rovka created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptApr 27 2021, 4:31 AM
rovka updated this revision to Diff 342013.Apr 30 2021, 12:36 PM
  • Enabled the tests for all character types (and added dependencies for the fixes that made that possible)
  • Simplified test expectation (no need to dump raw pointer values)
klausler accepted this revision.Apr 30 2021, 3:43 PM
This revision is now accepted and ready to land.Apr 30 2021, 3:43 PM
This revision was landed with ongoing or failed builds.May 3 2021, 1:17 AM
This revision was automatically updated to reflect the committed changes.