summaryrefslogtreecommitdiff
path: root/tools/llvm-extract/llvm-extract.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/llvm-extract/llvm-extract.cpp')
-rw-r--r--tools/llvm-extract/llvm-extract.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/llvm-extract/llvm-extract.cpp b/tools/llvm-extract/llvm-extract.cpp
index 7a6a1c101e..a78d1fd9b9 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();