Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2929,8 +2929,15 @@ bool InstrRefBasedLDV::depthFirstVLocAndEmit(
VTracker = nullptr;

// No scopes? No variable locations.
if (!LS.getCurrentFunctionScope())
if (!LS.getCurrentFunctionScope()) {
// FIXME: this is a sticking plaster to prevent a memory leak, these
// pointers will be automagically freed by being unique pointers, shortly.
for (unsigned int I = 0; I < MaxNumBlocks; ++I) {
delete[] MInLocs[I];
delete[] MOutLocs[I];
}
return false;
}

// Build map from block number to the last scope that uses the block.
SmallVector<unsigned, 16> EjectionMap;
Expand Down