This is an archive of the discontinued LLVM Phabricator instance.

[Symbol] GetTypeBitAlign() should return None in case of failure.
ClosedPublic

Authored by davide on Aug 12 2019, 9:29 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

davide created this revision.Aug 12 2019, 9:29 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 12 2019, 9:29 AM
xiaobai accepted this revision.Aug 12 2019, 11:11 AM

I appreciate you adding more error handling. Thank you!

This revision is now accepted and ready to land.Aug 12 2019, 11:11 AM

More than error handling, this allows us to distinguish with a type with zero alignment (if possible at all?) and an error getting the alignment from ASTContext/

aprantl accepted this revision.Aug 12 2019, 11:17 AM
aprantl added inline comments.
lldb/source/Expression/Materializer.cpp
803 ↗(On Diff #214647)

does this also need to be 7ull?

davide marked an inline comment as done.Aug 12 2019, 11:19 AM
davide added inline comments.
lldb/source/Expression/Materializer.cpp
803 ↗(On Diff #214647)

I'm going to move this to a function next to make sure we don't have to hardcode this everywhere.

Check LLVM's MathExtras.h, perhaps we already got one.

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptAug 12 2019, 1:04 PM