================
@@ -391,29 +414,236 @@ class MapInfoFinalizationPass
/// of the base address index.
void adjustMemberIndices(
llvm::SmallVectorImpl<llvm::SmallVector<int64_t>> &memberIndices,
- size_t memberIndex) {
- llvm::SmallVector<int64_t> baseAddrIndex = memberIndices[memberIndex];
+ ParentAndPlacement parentAndPlacement) {
+ llvm::SmallVector<int64_t> baseAddrIndex =
+ memberIndices[parentAndPlacement.index];
+ auto &expansionIndices = expandedBaseAddr[parentAndPlacement.parent];
// If we find another member that is "derived/a member of" the descriptor
// that is not the descriptor itself, we must insert a 0 for the new base
// address we have just added for the descriptor into the list at the
// appropriate position to maintain correctness of the positional/index
data
// for that member.
- for (llvm::SmallVector<int64_t> &member : memberIndices)
+ for (auto [i, member] : llvm::enumerate(memberIndices)) {
+ if (std::find(expansionIndices.begin(), expansionIndices.end(), i) !=
----------------
bhandarkar-pranav wrote:
nit: `sed 's/std::find/llvm::find/'`
https://github.com/llvm/llvm-project/pull/177715
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits