[flang-commits] [PATCH] D139183: [flang] Make SetLength TODO explicit in HLFIR

Jean Perier via Phabricator via flang-commits flang-commits at lists.llvm.org
Fri Dec 2 05:22:20 PST 2022


This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rGfed3d272da5a: [flang] Make SetLength TODO explicit in HLFIR (authored by jeanPerier).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139183/new/

https://reviews.llvm.org/D139183

Files:
  flang/lib/Lower/ConvertExprToHLFIR.cpp


Index: flang/lib/Lower/ConvertExprToHLFIR.cpp
===================================================================
--- flang/lib/Lower/ConvertExprToHLFIR.cpp
+++ flang/lib/Lower/ConvertExprToHLFIR.cpp
@@ -252,13 +252,7 @@
 //===--------------------------------------------------------------------===//
 
 template <typename T>
-struct BinaryOp {
-  static hlfir::EntityWithAttributes gen(mlir::Location loc,
-                                         fir::FirOpBuilder &builder, const T &,
-                                         hlfir::Entity lhs, hlfir::Entity rhs) {
-    TODO(loc, "binary op implementation in HLFIR");
-  }
-};
+struct BinaryOp {};
 
 #undef GENBIN
 #define GENBIN(GenBinEvOp, GenBinTyCat, GenBinFirOp)                           \
@@ -501,6 +495,17 @@
   }
 };
 
+template <int KIND>
+struct BinaryOp<Fortran::evaluate::SetLength<KIND>> {
+  using Op = Fortran::evaluate::SetLength<KIND>;
+  static hlfir::EntityWithAttributes gen(mlir::Location loc,
+                                         fir::FirOpBuilder &builder,
+                                         const Op &op, hlfir::Entity lhs,
+                                         hlfir::Entity rhs) {
+    TODO(loc, "SetLength lowering to HLFIR");
+  }
+};
+
 /// Lower Expr to HLFIR.
 class HlfirBuilder {
 public:


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D139183.479607.patch
Type: text/x-patch
Size: 1295 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20221202/c3cd5d10/attachment.bin>


More information about the flang-commits mailing list