Make sure the extracted function has external linkage, so that it doesn't

get eliminated by globaldce!

llvm-svn: 2736
This commit is contained in:
Chris Lattner 2002-05-23 18:36:25 +00:00
parent 3f3cf8c9e2
commit c17c38f3cc
1 changed files with 3 additions and 0 deletions

View File

@ -39,6 +39,9 @@ struct FunctionExtractorPass : public Pass {
// Yes, it is. Keep track of it...
Named = *I;
// Make sure it's globally accessable...
Named->setInternalLinkage(false);
// Remove the named function from the module.
M->getFunctionList().remove(I);
E = M->end();