[PATCH] D115791: [CodeGen] Store ElementType in LValue
Nikita Popov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 15 03:16:18 PST 2021
nikic created this revision.
nikic added reviewers: opaque-pointers, rjmccall.
nikic requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
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 <https://reviews.llvm.org/D103465>.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D115791
Files:
clang/lib/CodeGen/CGValue.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115791.394507.patch
Type: text/x-patch
Size: 4172 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20211215/d6528ba4/attachment.bin>
More information about the cfe-commits
mailing list