Make sure that deleted functions have external linkage
authorChris Lattner <sabre@nondot.org>
Thu, 24 Apr 2003 22:53:01 +0000 (22:53 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 24 Apr 2003 22:53:01 +0000 (22:53 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5912 91177308-0d34-0410-b5e6-96231b3b80d8

tools/bugpoint/BugDriver.cpp

index 7a2ce26a85406814d4a421a9d4313f86671e6d99..7ccbe0d828b84dcae37f8a929f1967f153f9f3ce 100644 (file)
@@ -37,7 +37,7 @@ void DeleteFunctionBody(Function *F) {
 
   // Next, delete all of the basic blocks.
   F->getBasicBlockList().clear();
-
+  F->setLinkage(GlobalValue::ExternalLinkage);
   assert(F->isExternal() && "This didn't make the function external!");
 }