This is an archive of the discontinued LLVM Phabricator instance.

[NFC][FE] Replace TypeSize with StorageUnitSize
ClosedPublic

Authored by Xiangling_L on Sep 24 2020, 1:51 PM.

Details

Summary

On some targets like AIX, last bitfield size is not always equal to last bitfield type size. Some bitfield like bool will have the same alignment as [unsigned]. So we'd like to use a more general term StorageUnit to replace type in this field.

This patch serves as a parent patch for us to add AIX bitfield related alignment rules in : https://reviews.llvm.org/D87029.

Diff Detail

Event Timeline

Xiangling_L created this revision.Sep 24 2020, 1:51 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 24 2020, 1:51 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
jasonliu accepted this revision.Sep 29 2020, 7:26 AM

LGTM.

clang/lib/AST/RecordLayoutBuilder.cpp
1749–1751

nit: drive-by fix?
I think we should move this block of comments into the else block.

1768–1771

nit: same as the above driver-by fix.

This revision is now accepted and ready to land.Sep 29 2020, 7:26 AM
This revision was automatically updated to reflect the committed changes.