This is an archive of the discontinued LLVM Phabricator instance.

[CodeGen] Store ElementType in LValue
ClosedPublic

Authored by nikic on Dec 15 2021, 3:16 AM.

Details

Reviewers
rjmccall
Group Reviewers
Restricted Project
Commits
rG6bca9a428e32: [CodeGen] Store ElementType in LValue
Summary

Store the pointer element type inside LValue so that we can preserve it when converting it back into an Address. Storing the pointer element type might not be strictly required here in that we could probably re-derive it from the QualType (which would require CGF access though), but storing it seems like the simpler solution.

The global register case is special and does not store an element type, as the value is not a pointer type in that case and it's not possible to create an Address from it.

This is the main remaining part from D103465.

Diff Detail

Event Timeline

nikic requested review of this revision.Dec 15 2021, 3:16 AM
nikic created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptDec 15 2021, 3:16 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
This revision is now accepted and ready to land.Dec 15 2021, 10:27 PM
This revision was landed with ongoing or failed builds.Dec 16 2021, 12:23 AM
This revision was automatically updated to reflect the committed changes.