[all-commits] [llvm/llvm-project] 6829bd: [flang] (NFC) Expose internal idiom as utility API

Peter Klausler via All-commits all-commits at lists.llvm.org
Thu May 13 11:20:05 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6829bd3ed0515e17c84c5e72fe1742bd20ee61e5
      https://github.com/llvm/llvm-project/commit/6829bd3ed0515e17c84c5e72fe1742bd20ee61e5
  Author: peter klausler <pklausler at nvidia.com>
  Date:   2021-05-13 (Thu, 13 May 2021)

  Changed paths:
    M flang/include/flang/Evaluate/tools.h
    M flang/lib/Evaluate/fold-designator.cpp
    M flang/lib/Evaluate/tools.cpp
    M flang/lib/Semantics/check-declarations.cpp
    M flang/lib/Semantics/expression.cpp

  Log Message:
  -----------
  [flang] (NFC) Expose internal idiom as utility API

Add overloads to AsGenericExpr() in Evaluate/tools.h to take care
of wrapping an untyped DataRef or bare Symbol in a typed Designator
wrapped up in a generic Expr<SomeType>.  Use the new overloads to
replace a few instances of code that was calling TypedWrapper<>()
with a dynamic type.

This new tool will be useful in lowering to drive some code that
works with typed expressions (viz., list-directed I/O list items)
when starting with only a bare Symbol (viz., NAMELIST).

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




More information about the All-commits mailing list