This is an archive of the discontinued LLVM Phabricator instance.

[Alignment][Clang][NFC] Add CharUnits::getAsAlign
ClosedPublic

Authored by gchatelet on Oct 1 2019, 7:36 AM.

Details

Summary

This is a prerequisite to removing llvm::GlobalObject::setAlignment(unsigned).
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

Event Timeline

gchatelet created this revision.Oct 1 2019, 7:36 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 1 2019, 7:36 AM
courbet added inline comments.Oct 3 2019, 5:33 AM
clang/lib/CodeGen/CGObjCMac.cpp
2021

I think the semantic is None here.

6321–6322

I don;t think getABITypeAlignment makes any promisses on the return value.

6762

ditto

6989

ditto

gchatelet marked 5 inline comments as done.Oct 3 2019, 5:42 AM
gchatelet added inline comments.
clang/lib/CodeGen/CGObjCMac.cpp
6321–6322

It is, I posted a comment on the other patch https://reviews.llvm.org/D68268#inline-614898

gchatelet updated this revision to Diff 222994.Oct 3 2019, 5:43 AM
gchatelet marked an inline comment as done.
  • Address comments
courbet accepted this revision.Oct 3 2019, 5:50 AM
This revision is now accepted and ready to land.Oct 3 2019, 5:50 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptOct 3 2019, 5:58 AM