mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-21 01:06:46 +00:00
don't internalize available_externally functions, they are
really just declarations. This is related to PR6524 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100269 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1e86e3fb4b
commit
8e9c48a606
@ -156,6 +156,8 @@ bool InternalizePass::runOnModule(Module &M) {
|
||||
for (Module::global_iterator I = M.global_begin(), E = M.global_end();
|
||||
I != E; ++I)
|
||||
if (!I->isDeclaration() && !I->hasLocalLinkage() &&
|
||||
// Available externally is really just a "declaration with a body".
|
||||
!I->hasAvailableExternallyLinkage() &&
|
||||
!ExternalNames.count(I->getName())) {
|
||||
I->setLinkage(GlobalValue::InternalLinkage);
|
||||
Changed = true;
|
||||
@ -167,6 +169,8 @@ bool InternalizePass::runOnModule(Module &M) {
|
||||
for (Module::alias_iterator I = M.alias_begin(), E = M.alias_end();
|
||||
I != E; ++I)
|
||||
if (!I->isDeclaration() && !I->hasInternalLinkage() &&
|
||||
// Available externally is really just a "declaration with a body".
|
||||
!I->hasAvailableExternallyLinkage() &&
|
||||
!ExternalNames.count(I->getName())) {
|
||||
I->setLinkage(GlobalValue::InternalLinkage);
|
||||
Changed = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user