diff --git a/llvm/tools/extract/extract.cpp b/llvm/tools/extract/extract.cpp index 7a6a1c101eca..a78d1fd9b994 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();