forked from OSchip/llvm-project
Don't internalize available_externally functions. We already did the right
thing for variables. llvm-svn: 127138
This commit is contained in:
parent
b86f5f4106
commit
871cfde1c2
|
@ -126,6 +126,8 @@ bool InternalizePass::runOnModule(Module &M) {
|
|||
// FIXME: maybe use private linkage?
|
||||
for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
|
||||
if (!I->isDeclaration() && // Function must be defined here
|
||||
// Available externally is really just a "declaration with a body".
|
||||
!I->hasAvailableExternallyLinkage() &&
|
||||
!I->hasLocalLinkage() && // Can't already have internal linkage
|
||||
!ExternalNames.count(I->getName())) {// Not marked to keep external?
|
||||
I->setLinkage(GlobalValue::InternalLinkage);
|
||||
|
|
Loading…
Reference in New Issue