they may have ValuesAtScopes map entries referencing their outer loops.
This fixes a user-after-free reported in PR8471.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117698
91177308-0d34-0410-b5e6-
96231b3b80d8
PushDefUseChildren(I, Worklist);
}
+
+ // Forget all contained loops too, to avoid dangling entries in the
+ // ValuesAtScopes map.
+ for (Loop::iterator I = L->begin(), E = L->end(); I != E; ++I)
+ forgetLoop(*I);
}
/// forgetValue - This method should be called by the client when it has