[all-commits] [llvm/llvm-project] 6bca9a: [CodeGen] Store ElementType in LValue

Nikita Popov via All-commits all-commits at lists.llvm.org
Thu Dec 16 00:23:48 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6bca9a428e32c598f793821e407d5c9d7bbe7cd8
      https://github.com/llvm/llvm-project/commit/6bca9a428e32c598f793821e407d5c9d7bbe7cd8
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2021-12-16 (Thu, 16 Dec 2021)

  Changed paths:
    M clang/lib/CodeGen/CGValue.h

  Log Message:
  -----------
  [CodeGen] Store ElementType in LValue

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.

Differential Revision: https://reviews.llvm.org/D115791




More information about the All-commits mailing list