This is an archive of the discontinued LLVM Phabricator instance.

[NFC] Use std::optional over llvm::Optional to implement MaybeAlign
ClosedPublic

Authored by gchatelet on Dec 15 2022, 5:53 AM.

Diff Detail

Event Timeline

gchatelet created this revision.Dec 15 2022, 5:53 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 15 2022, 5:53 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
gchatelet requested review of this revision.Dec 15 2022, 5:53 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 15 2022, 5:53 AM
courbet accepted this revision.Dec 15 2022, 5:57 AM
courbet added inline comments.
llvm/include/llvm/Support/Alignment.h
134

explicit

llvm/lib/Support/OptimizedStructLayout.cpp
14

Layering I guess ?

This revision is now accepted and ready to land.Dec 15 2022, 5:57 AM
gchatelet updated this revision to Diff 483162.Dec 15 2022, 6:36 AM
gchatelet marked an inline comment as done.
  • Add missing explicit
gchatelet marked an inline comment as done.Dec 15 2022, 6:37 AM
gchatelet added inline comments.
llvm/include/llvm/Support/Alignment.h
134

As discussed offline it is always safe to create a MaybeAlign from an Align.
Thx for noticing that an explicit is missing on the line below though.

llvm/lib/Support/OptimizedStructLayout.cpp
14

Yep...

gchatelet marked an inline comment as done.Dec 15 2022, 6:38 AM
This revision was landed with ongoing or failed builds.Dec 15 2022, 7:17 AM
This revision was automatically updated to reflect the committed changes.