[llvm-commits] CVS: llvm/lib/VMCore/Function.cpp

Chris Lattner lattner at cs.uiuc.edu
Wed Sep 17 00:00:03 PDT 2003


Changes in directory llvm/lib/VMCore:

Function.cpp updated: 1.49 -> 1.50

---
Log message:

Change the semancics of the dropallrefs method


---
Diffs of the changes:

Index: llvm/lib/VMCore/Function.cpp
diff -u llvm/lib/VMCore/Function.cpp:1.49 llvm/lib/VMCore/Function.cpp:1.50
--- llvm/lib/VMCore/Function.cpp:1.49	Tue Sep  9 11:58:41 2003
+++ llvm/lib/VMCore/Function.cpp	Tue Sep 16 23:58:59 2003
@@ -104,8 +104,6 @@
 Function::~Function() {
   dropAllReferences();    // After this it is safe to delete instructions.
 
-  BasicBlocks.clear();    // Delete all basic blocks...
-
   // Delete all of the method arguments and unlink from symbol table...
   ArgumentList.clear();
   ArgumentList.setParent(0);
@@ -149,6 +147,7 @@
 void Function::dropAllReferences() {
   for (iterator I = begin(), E = end(); I != E; ++I)
     I->dropAllReferences();
+  BasicBlocks.clear();    // Delete all basic blocks...
 }
 
 /// getIntrinsicID - This method returns the ID number of the specified





More information about the llvm-commits mailing list