[llvm-commits] [llvm] r119873 - /llvm/trunk/include/llvm/ADT/IntervalMap.h

Jakob Stoklund Olesen stoklund at 2pi.dk
Fri Nov 19 15:28:59 PST 2010


Author: stoklund
Date: Fri Nov 19 17:28:59 2010
New Revision: 119873

URL: http://llvm.org/viewvc/llvm-project?rev=119873&view=rev
Log:
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.

Modified:
    llvm/trunk/include/llvm/ADT/IntervalMap.h

Modified: llvm/trunk/include/llvm/ADT/IntervalMap.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/IntervalMap.h?rev=119873&r1=119872&r2=119873&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/IntervalMap.h (original)
+++ llvm/trunk/include/llvm/ADT/IntervalMap.h Fri Nov 19 17:28:59 2010
@@ -848,6 +848,11 @@
     new(&rootLeaf()) RootLeaf();
   }
 
+  ~IntervalMap() {
+    clear();
+    rootLeaf().~RootLeaf();
+  }
+
   /// empty -  Return true when no intervals are mapped.
   bool empty() const {
     return rootSize == 0;





More information about the llvm-commits mailing list