diff options
author | Jeremy Morse <jeremy.morse@sony.com> | 2021-06-29 15:40:43 +0100 |
---|---|---|
committer | Jeremy Morse <jeremy.morse@sony.com> | 2021-06-29 15:47:17 +0100 |
commit | e63b18bc84a27718266f5c838a572ba423f70a2c (patch) | |
tree | fe1498e2eceba567bdbbd51951eb05bc835b32bd /llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp | |
parent | bf9dcb4cd21513a2b90db8af4f7f0e6769afe205 (diff) | |
download | llvm-e63b18bc84a27718266f5c838a572ba423f70a2c.zip llvm-e63b18bc84a27718266f5c838a572ba423f70a2c.tar.gz llvm-e63b18bc84a27718266f5c838a572ba423f70a2c.tar.bz2 |
Catch an extremely obvious memory leak, thanks asan
https://lab.llvm.org/buildbot/#/builders/5/builds/9208
(dbg-phis-merging-in-ldv.mir and dbg-phis-with-loops.mir in the asan
check stage)
Diffstat (limited to 'llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp')
-rw-r--r-- | llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp b/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp index 8e05882..75e551b 100644 --- a/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp +++ b/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp @@ -3574,6 +3574,9 @@ public: LDVSSAUpdater(LocIdx L, ValueIDNum **MLiveIns) : Loc(L), MLiveIns(MLiveIns) {} void reset() { + for (auto &Block : BlockMap) + delete Block.second; + PHIs.clear(); UndefMap.clear(); BlockMap.clear(); |