[all-commits] [llvm/llvm-project] abbc2e: [CodeGen] Store ElementType in Address

Nikita Popov via All-commits all-commits at lists.llvm.org
Wed Dec 15 00:03:40 PST 2021


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

  Changed paths:
    M clang/lib/CodeGen/Address.h
    M clang/lib/CodeGen/CGExpr.cpp
    M clang/lib/CodeGen/CGValue.h

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

Explicitly track the pointer element type in Address, rather than
deriving it from the pointer type, which will no longer be possible
with opaque pointers. This just adds the basic facility, for now
everything is still going through the deprecated constructors.

I had to adjust one place in the LValue implementation to satisfy
the new assertions: Global registers are represented as a
MetadataAsValue, which does not have a pointer type. We should
avoid using Address in this case.

This implements a part of D103465.

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




More information about the All-commits mailing list