summaryrefslogtreecommitdiff
path: root/tools/bugpoint/BugDriver.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-09-17 05:00:07 +0000
committerChris Lattner <sabre@nondot.org>2003-09-17 05:00:07 +0000
commit79f03d350e426f017696c63a29330d153e0a7932 (patch)
treee6d575623824d342384a95fb903f8a532154fd22 /tools/bugpoint/BugDriver.cpp
parent0981b62eec9286aedeac61a5ab227f9acfaeefb7 (diff)
downloadllvm-79f03d350e426f017696c63a29330d153e0a7932.tar.gz
llvm-79f03d350e426f017696c63a29330d153e0a7932.tar.bz2
llvm-79f03d350e426f017696c63a29330d153e0a7932.tar.xz
Use new method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8573 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/bugpoint/BugDriver.cpp')
-rw-r--r--tools/bugpoint/BugDriver.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/tools/bugpoint/BugDriver.cpp b/tools/bugpoint/BugDriver.cpp
index e950cdb18c..67f59fd54d 100644
--- a/tools/bugpoint/BugDriver.cpp
+++ b/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!");
}