[llvm-branch-commits] [flang] [Flang][OpenMP] Derived type explicit allocatable member mapping (PR #96266)
Sergio Afonso via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Aug 12 08:42:15 PDT 2024
================
@@ -175,99 +271,63 @@ getComponentObject(std::optional<Object> object,
return getComponentObject(baseObj.value(), semaCtx);
}
-static void
-generateMemberPlacementIndices(const Object &object,
- llvm::SmallVectorImpl<int> &indices,
- semantics::SemanticsContext &semaCtx) {
+void generateMemberPlacementIndices(const Object &object,
+ llvm::SmallVectorImpl<int64_t> &indices,
+ semantics::SemanticsContext &semaCtx) {
----------------
skatrak wrote:
There's an implicit assumption here that `indices` is empty (it reverses it at the end of the function, so two calls to this function on the same vector would result in some unexpected order), maybe add an assert for `indices.empty()` or call `indices.clear()` before filling it.
https://github.com/llvm/llvm-project/pull/96266
More information about the llvm-branch-commits
mailing list