summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/Function.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-09-17 04:58:59 +0000
committerChris Lattner <sabre@nondot.org>2003-09-17 04:58:59 +0000
commitc1b165121058d2c8a08ee44d27ff16d0f0f89dbb (patch)
tree91fd561291a26114b19cd06063ad6fecf2c4e42e /llvm/lib/VMCore/Function.cpp
parentefc07b7fde8147db78241cf1259cc86788a90bd2 (diff)
downloadbcm5719-llvm-c1b165121058d2c8a08ee44d27ff16d0f0f89dbb.tar.gz
bcm5719-llvm-c1b165121058d2c8a08ee44d27ff16d0f0f89dbb.zip
Change the semancics of the dropallrefs method
llvm-svn: 8572
Diffstat (limited to 'llvm/lib/VMCore/Function.cpp')
-rw-r--r--llvm/lib/VMCore/Function.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/VMCore/Function.cpp b/llvm/lib/VMCore/Function.cpp
index 74098ffc45a..836c6b64a33 100644
--- a/llvm/lib/VMCore/Function.cpp
+++ b/llvm/lib/VMCore/Function.cpp
@@ -104,8 +104,6 @@ Function::Function(const FunctionType *Ty, LinkageTypes Linkage,
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 @@ const Type *Function::getReturnType() const {
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
OpenPOWER on IntegriCloud