Skip to content

Commit b58b86e

Browse files
committed
destroy in reverse order
1 parent e22cf2e commit b58b86e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/IRGen/GenDistributed.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -591,9 +591,10 @@ void DistributedAccessor::emitReturn(llvm::Value *errorValue) {
591591
}
592592

593593
// Destroy loaded arguments.
594-
llvm::for_each(LoadedArguments, [&](const auto &argInfo) {
594+
for (auto argInfo = LoadedArguments.rbegin();
595+
argInfo != LoadedArguments.rend(); ++argInfo) {
595596
emitDestroyCall(IGF, argInfo.second, argInfo.first);
596-
});
597+
}
597598

598599
Explosion voidResult;
599600

0 commit comments

Comments
 (0)