[llvm-branch-commits] [Flang][OpenMP] Derived type explicit allocatable member mapping (PR #111192)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Oct 24 05:55:34 PDT 2024
================
@@ -907,28 +908,46 @@ void ClauseProcessor::processMapObjects(
object.ref(), clauseLocation, asFortran, bounds,
treatIndexAsSection);
+ mlir::Value baseOp = info.rawInput;
+ if (object.sym()->owner().IsDerivedType()) {
+ omp::ObjectList objectList = gatherObjects(object, semaCtx);
+ assert(!objectList.empty() &&
+ "could not find parent objects of derived type member");
+ parentObj = objectList[0];
----------------
agozillon wrote:
Well, consider the symbol: "parent%child%member", we pass the whole symbol, and start from the RHS and peel back the symbol layers until we get to the end, "parent" in this case, we then reverse the list, so "parent" is the first member and it goes from LHS to RHS rather than RHS to LHS! Mainly mentioning to help explain a bit, more than happy to add a comment for it though :-)
https://github.com/llvm/llvm-project/pull/111192
More information about the llvm-branch-commits
mailing list