mirror of
https://github.com/RPCS3/llvm.git
synced 2024-11-26 13:10:42 +00:00
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:
parent
8f1717f697
commit
71bcba7d1a
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user