summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/include/llvm/CodeGen/SlotIndexes.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/include/llvm/CodeGen/SlotIndexes.h b/llvm/include/llvm/CodeGen/SlotIndexes.h
index 5dc42e20deb..7b621bee259 100644
--- a/llvm/include/llvm/CodeGen/SlotIndexes.h
+++ b/llvm/include/llvm/CodeGen/SlotIndexes.h
@@ -376,6 +376,11 @@ namespace llvm {
initializeSlotIndexesPass(*PassRegistry::getPassRegistry());
}
+ ~SlotIndexes() {
+ // The indexList's nodes are all allocated in the BumpPtrAllocator.
+ indexList.clearAndLeakNodesUnsafely();
+ }
+
void getAnalysisUsage(AnalysisUsage &au) const override;
void releaseMemory() override;
OpenPOWER on IntegriCloud