diff --git a/tools/extract/extract.cpp b/tools/extract/extract.cpp index 7a6a1c101ec..a78d1fd9b99 100644 --- a/tools/extract/extract.cpp +++ b/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(); diff --git a/tools/llvm-extract/llvm-extract.cpp b/tools/llvm-extract/llvm-extract.cpp index 7a6a1c101ec..a78d1fd9b99 100644 --- a/tools/llvm-extract/llvm-extract.cpp +++ b/tools/llvm-extract/llvm-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();