diff options
author | Alina Sbirlea <asbirlea@google.com> | 2020-01-23 14:21:08 -0800 |
---|---|---|
committer | Alina Sbirlea <asbirlea@google.com> | 2020-01-23 16:04:57 -0800 |
commit | 9e66c4ec127ef6e73f1bafe06fe3fba45d59feee (patch) | |
tree | 680cddd0ef06a249261dbd39c67b932b6b2765a3 /lldb/unittests/ScriptInterpreter/Python | |
parent | 2af74e27ed7d0832cbdde9cb969aaca7a42e99f9 (diff) | |
download | llvm-9e66c4ec127ef6e73f1bafe06fe3fba45d59feee.zip llvm-9e66c4ec127ef6e73f1bafe06fe3fba45d59feee.tar.gz llvm-9e66c4ec127ef6e73f1bafe06fe3fba45d59feee.tar.bz2 |
[Utils] Use WeakTrackingVH in vector used as scratch storage.
The utility method RecursivelyDeleteTriviallyDeadInstructions receives
as input a vector of Instructions, where all inputs are valid
instructions. This same vector is used as a scratch storage (per the
header comment) to recursively delete instructions. If an instruction is
added as an operand of multiple other instructions, it may be added twice,
then deleted once, then the second reference in the vector is invalid.
Switch to using a Vector<WeakTrackingVH>.
This change facilitates a clean-up in LoopStrengthReduction.
Diffstat (limited to 'lldb/unittests/ScriptInterpreter/Python')
0 files changed, 0 insertions, 0 deletions