From: Jakob Stoklund Olesen Date: Fri, 19 Nov 2010 23:28:59 +0000 (+0000) Subject: Implement IntervalMap destructor. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=785ab18a054373f1a2f8d0f6f04db2d458878bd9;p=oota-llvm.git Implement IntervalMap destructor. Key and value objects may not be destructed instantly when they are erased from the container, but they will be destructed eventually by the IntervalMap destructor. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119873 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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;