From c17c38f3cc9e13a669e73f3966ff0de6cba72ade Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 23 May 2002 18:36:25 +0000 Subject: Make sure the extracted function has external linkage, so that it doesn't get eliminated by globaldce! llvm-svn: 2736 --- llvm/tools/extract/extract.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'llvm') 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(); -- cgit v1.2.3