aboutsummaryrefslogtreecommitdiffstats
path: root/tools/extract
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-10-07 18:33:53 +0000
committerChris Lattner <sabre@nondot.org>2002-10-07 18:33:53 +0000
commit71bcba7d1abc2f3b9a4739938d6252dac91bce6e (patch)
treed019e7e9e7bcfee157613dd9cb0c2b9b4abee163 /tools/extract
parent8f1717f6970039ebad57754e548237bac7d0d871 (diff)
downloadexternal_llvm-71bcba7d1abc2f3b9a4739938d6252dac91bce6e.zip
external_llvm-71bcba7d1abc2f3b9a4739938d6252dac91bce6e.tar.gz
external_llvm-71bcba7d1abc2f3b9a4739938d6252dac91bce6e.tar.bz2
Avoid making external global variables internal
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4059 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/extract')
-rw-r--r--tools/extract/extract.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/extract/extract.cpp b/tools/extract/extract.cpp
index b16b4f6..5df4cb2 100644
--- a/tools/extract/extract.cpp
+++ b/tools/extract/extract.cpp
@@ -30,7 +30,8 @@ struct FunctionExtractorPass : public Pass {
bool run(Module &M) {
// Mark all global variables to be internal
for (Module::giterator I = M.gbegin(), E = M.gend(); I != E; ++I)
- I->setInternalLinkage(true);
+ if (!I->isExternal())
+ I->setInternalLinkage(true);
Function *Named = 0;