rename destroy -> releaseMemory to properly hook into passmgr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55508 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/llvm/Analysis/IntervalPartition.h b/include/llvm/Analysis/IntervalPartition.h
index 793f7d5..e724681 100644
--- a/include/llvm/Analysis/IntervalPartition.h
+++ b/include/llvm/Analysis/IntervalPartition.h
@@ -59,9 +59,6 @@
//
IntervalPartition(IntervalPartition &I, bool);
- // Destructor - Free memory
- ~IntervalPartition() { destroy(); }
-
// print - Show contents in human readable format...
virtual void print(std::ostream &O, const Module* = 0) const;
void print(std::ostream *O, const Module* M = 0) const {
@@ -92,10 +89,10 @@
// Interface to Intervals vector...
const std::vector<Interval*> &getIntervals() const { return Intervals; }
-private:
- // destroy - Reset state back to before function was analyzed
- void destroy();
+ // releaseMemory - Reset state back to before function was analyzed
+ void releaseMemory();
+private:
// addIntervalToPartition - Add an interval to the internal list of intervals,
// and then add mappings from all of the basic blocks in the interval to the
// interval itself (in the IntervalMap).
diff --git a/lib/Analysis/IntervalPartition.cpp b/lib/Analysis/IntervalPartition.cpp
index 7280f8f..adb6e9d 100644
--- a/lib/Analysis/IntervalPartition.cpp
+++ b/lib/Analysis/IntervalPartition.cpp
@@ -23,8 +23,8 @@
// IntervalPartition Implementation
//===----------------------------------------------------------------------===//
-// destroy - Reset state back to before function was analyzed
-void IntervalPartition::destroy() {
+// releaseMemory - Reset state back to before function was analyzed
+void IntervalPartition::releaseMemory() {
for (unsigned i = 0, e = Intervals.size(); i != e; ++i)
delete Intervals[i];
IntervalMap.clear();