Make sure the extracted function has external linkage, so that it doesn't
get eliminated by globaldce!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2736 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/extract/extract.cpp b/tools/extract/extract.cpp
index 7a6a1c1..a78d1fd 100644
--- a/tools/extract/extract.cpp
+++ b/tools/extract/extract.cpp
@@ -39,6 +39,9 @@
         // 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();