forked from OSchip/llvm-project
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:
parent
3f3cf8c9e2
commit
c17c38f3cc
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue