Avoid making external global variables internal

llvm-svn: 4059
This commit is contained in:
Chris Lattner 2002-10-07 18:33:53 +00:00
parent 31ae011e43
commit 8e2c197c17
1 changed files with 2 additions and 1 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;