diff options
author | Roman Lebedev <lebedev.ri@gmail.com> | 2020-07-05 01:01:46 +0300 |
---|---|---|
committer | Roman Lebedev <lebedev.ri@gmail.com> | 2020-07-05 01:01:46 +0300 |
commit | f804bd586ee58199db4cfb2da8e9ef067425900b (patch) | |
tree | 60c4a45d138049a2ed28405ffecca849cc4be36b /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | fbbb6884e108419692a88e28eeeaa92cfbc08122 (diff) | |
download | llvm-f804bd586ee58199db4cfb2da8e9ef067425900b.zip llvm-f804bd586ee58199db4cfb2da8e9ef067425900b.tar.gz llvm-f804bd586ee58199db4cfb2da8e9ef067425900b.tar.bz2 |
[llvm-reduce] extractGVsFromModule(): don't crash when deleting instr twice
As it can be seen in newly-added (previously-crashing) test-case,
there can be a situation where multiple GV's are used in instr,
and we would schedule the same instruction to be deleted several times,
crashing when trying to delete it the second time.
We could either store WeakVH (done here), or use something set-like.
I think using WeakVH is prevalent in these cases elsewhere.
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions