diff options
author | Chris Lattner <sabre@nondot.org> | 2002-10-07 18:33:53 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-10-07 18:33:53 +0000 |
commit | 71bcba7d1abc2f3b9a4739938d6252dac91bce6e (patch) | |
tree | d019e7e9e7bcfee157613dd9cb0c2b9b4abee163 /tools/extract | |
parent | 8f1717f6970039ebad57754e548237bac7d0d871 (diff) | |
download | external_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.cpp | 3 |
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; |