Avoid making external global variables internal

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4059 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2002-10-07 18:33:53 +00:00
parent 8f1717f697
commit 71bcba7d1a
2 changed files with 4 additions and 2 deletions

View File

@ -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;

View File

@ -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;