This is an archive of the discontinued LLVM Phabricator instance.

[CodeGen] Use getCharWidth() more consistently in CGRecordLowering. NFC
ClosedPublic

Authored by bjope on Jan 19 2021, 9:19 AM.

Details

Summary

When using getByteArrayType the requested size is calculated in
char units, but the type used for the array was hardcoded to the
Int8Ty. This patch is using getCharWIdth a bit more consistently
by using getIntNTy in combination with getCharWidth, instead
of explictly using getInt8Ty.

Diff Detail

Event Timeline

bjope requested review of this revision.Jan 19 2021, 9:19 AM
bjope created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptJan 19 2021, 9:19 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
bjope retitled this revision from [CodeGen] Honor getCharWidth() in CGRecordLowering to [CodeGen] Use getCharWidth() more consistently in CGRecordLowering. NFC.Jan 19 2021, 11:03 AM
bjope edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Jan 20 2021, 10:18 AM
This revision was landed with ongoing or failed builds.Jan 22 2021, 12:14 PM
This revision was automatically updated to reflect the committed changes.