diff options
| author | Chris Lattner <sabre@nondot.org> | 2002-05-23 18:36:25 +0000 | 
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2002-05-23 18:36:25 +0000 | 
| commit | c17c38f3cc9e13a669e73f3966ff0de6cba72ade (patch) | |
| tree | 77d3f61c0291112c44bffd37c98641fcc0c3e880 /llvm | |
| parent | 3f3cf8c9e2e8b29f1654c9e0a18fbacd2297f8f6 (diff) | |
| download | bcm5719-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')
| -rw-r--r-- | llvm/tools/extract/extract.cpp | 3 | 
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(); | 

