diff --git a/include/llvm/ADT/IntervalMap.h b/include/llvm/ADT/IntervalMap.h index 96b5161da7f..56fbe933541 100644 --- a/include/llvm/ADT/IntervalMap.h +++ b/include/llvm/ADT/IntervalMap.h @@ -848,6 +848,11 @@ public: new(&rootLeaf()) RootLeaf(); } + ~IntervalMap() { + clear(); + rootLeaf().~RootLeaf(); + } + /// empty - Return true when no intervals are mapped. bool empty() const { return rootSize == 0;