summaryrefslogtreecommitdiffstats
path: root/llvm/tools/extract
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-05-23 18:36:25 +0000
committerChris Lattner <sabre@nondot.org>2002-05-23 18:36:25 +0000
commitc17c38f3cc9e13a669e73f3966ff0de6cba72ade (patch)
tree77d3f61c0291112c44bffd37c98641fcc0c3e880 /llvm/tools/extract
parent3f3cf8c9e2e8b29f1654c9e0a18fbacd2297f8f6 (diff)
downloadbcm5719-llvm-c17c38f3cc9e13a669e73f3966ff0de6cba72ade.tar.gz
bcm5719-llvm-c17c38f3cc9e13a669e73f3966ff0de6cba72ade.zip
Make sure the extracted function has external linkage, so that it doesn't
get eliminated by globaldce! llvm-svn: 2736
Diffstat (limited to 'llvm/tools/extract')
-rw-r--r--llvm/tools/extract/extract.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/tools/extract/extract.cpp b/llvm/tools/extract/extract.cpp
index 7a6a1c101ec..a78d1fd9b99 100644
--- a/llvm/tools/extract/extract.cpp
+++ b/llvm/tools/extract/extract.cpp
@@ -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();
OpenPOWER on IntegriCloud