diff options
author | Chris Lattner <sabre@nondot.org> | 2003-09-17 05:00:07 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-09-17 05:00:07 +0000 |
commit | 8552e7c6df575c6ceb550a274cb1d6ed0da9f04a (patch) | |
tree | 87771096d69ca63b5ef8885b4e61d02b8aa69487 | |
parent | c1b165121058d2c8a08ee44d27ff16d0f0f89dbb (diff) | |
download | bcm5719-llvm-8552e7c6df575c6ceb550a274cb1d6ed0da9f04a.tar.gz bcm5719-llvm-8552e7c6df575c6ceb550a274cb1d6ed0da9f04a.zip |
Use new method
llvm-svn: 8573
-rw-r--r-- | llvm/tools/bugpoint/BugDriver.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/llvm/tools/bugpoint/BugDriver.cpp b/llvm/tools/bugpoint/BugDriver.cpp index e950cdb18c0..67f59fd54d7 100644 --- a/llvm/tools/bugpoint/BugDriver.cpp +++ b/llvm/tools/bugpoint/BugDriver.cpp @@ -54,13 +54,8 @@ std::string getPassesString(const std::vector<const PassInfo*> &Passes) { // blocks, making it external. // void DeleteFunctionBody(Function *F) { - // First, break circular use/def chain references... - for (Function::iterator I = F->begin(), E = F->end(); I != E; ++I) - I->dropAllReferences(); - - // Next, delete all of the basic blocks. - F->getBasicBlockList().clear(); - F->setLinkage(GlobalValue::ExternalLinkage); + // delete the body of the function... + F->deleteBody(); assert(F->isExternal() && "This didn't make the function external!"); } |