forked from OSchip/llvm-project
Fix a leak found by LSan: ConsumedBlockInfo owns its StateMapsArray entries.
(I tried converting StateMapsArray to a vector<unique_ptr> and changing the types of getInfo() and addInfo() to take unique_ptrs. This mostly worked, except for the three-argument form of addInfo() which I found confusing enough that I went with this simpler fix for now.) llvm-svn: 208108
This commit is contained in:
parent
c14ccc9184
commit
5f8116ba46
|
@ -201,7 +201,8 @@ namespace consumed {
|
|||
|
||||
public:
|
||||
ConsumedBlockInfo() { }
|
||||
|
||||
~ConsumedBlockInfo() { llvm::DeleteContainerPointers(StateMapsArray); }
|
||||
|
||||
ConsumedBlockInfo(unsigned int NumBlocks, PostOrderCFGView *SortedGraph)
|
||||
: StateMapsArray(NumBlocks, nullptr), VisitOrder(NumBlocks, 0) {
|
||||
unsigned int VisitOrderCounter = 0;
|
||||
|
|
Loading…
Reference in New Issue