[all-commits] [llvm/llvm-project] 531219: [flang] Support lowering of parent component in st...

PeixinQiao via All-commits all-commits at lists.llvm.org
Tue Oct 25 18:13:59 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 531219865464146010d9611d6d7515499e109b5a
      https://github.com/llvm/llvm-project/commit/531219865464146010d9611d6d7515499e109b5a
  Author: Peixin-Qiao <qiaopeixin at huawei.com>
  Date:   2022-10-26 (Wed, 26 Oct 2022)

  Changed paths:
    M flang/lib/Lower/ConvertExpr.cpp
    M flang/test/Lower/structure-constructors.f90

  Log Message:
  -----------
  [flang] Support lowering of parent component in strecture constructor

Reuse the previous record assignment code. Use gen(expr) to generate
the fir::ExtendedValue of parent component recursively and convert the
structure to a fir.ref<T> type, where T is the record type of parent
component. Then, fir::factory::genRecordAssignment can be reused to
assign the parent component to the type-casted structure.

Reviewed By: jeanPerier

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




More information about the All-commits mailing list