forked from OSchip/llvm-project
Make sure that deleted functions have external linkage
llvm-svn: 5912
This commit is contained in:
parent
1d080f24c5
commit
c3380918a5
|
|
@ -37,7 +37,7 @@ void DeleteFunctionBody(Function *F) {
|
||||||
|
|
||||||
// Next, delete all of the basic blocks.
|
// Next, delete all of the basic blocks.
|
||||||
F->getBasicBlockList().clear();
|
F->getBasicBlockList().clear();
|
||||||
|
F->setLinkage(GlobalValue::ExternalLinkage);
|
||||||
assert(F->isExternal() && "This didn't make the function external!");
|
assert(F->isExternal() && "This didn't make the function external!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue