[flang-commits] [PATCH] D136453: [flang] Add kernel to lower expressions to HLFIR
Pete Steinfeld via Phabricator via flang-commits
flang-commits at lists.llvm.org
Fri Oct 21 10:59:47 PDT 2022
PeteSteinfeld accepted this revision.
PeteSteinfeld added a comment.
This revision is now accepted and ready to land.
Aside from my comment about creating a utility function for the code in Bridge.cpp, all builds and tests correctly and looks good.
================
Comment at: flang/lib/Lower/Bridge.cpp:431-434
+ auto [exv, exvCleanup] =
+ hlfir::translateToExtendedValue(loc, getFirOpBuilder(), variable);
+ if (exvCleanup)
+ context.attachCleanup(*exvCleanup);
----------------
This patch includes this set of calls a couple of times where you conditionally attach a cleanup function. Should you have a separate function to handle such combinations of calls?
================
Comment at: flang/lib/Lower/Bridge.cpp:465-468
+ auto [exv, exvCleanup] =
+ hlfir::translateToExtendedValue(loc, builder, variable);
+ if (exvCleanup)
+ stmtCtx.attachCleanup(*exvCleanup);
----------------
Here it is again ...
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136453/new/
https://reviews.llvm.org/D136453
More information about the flang-commits
mailing list