This patch is a sticking-paster until D118774 solves the situation with
unique_ptrs. I'm certainly wishing I'd focused on that first X_X.
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;