Aliases don't have available_externally linkage.

Allowing that is probably a good idea, but currently we don't, so
this is dead code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242031 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola 2015-07-13 14:39:02 +00:00
parent 94162a044b
commit 0b2f27eb8d

View File

@ -81,16 +81,5 @@ bool EliminateAvailableExternally::runOnModule(Module &M) {
NumFunctions++;
}
// Drop targets of available externally aliases.
for (Module::alias_iterator I = M.alias_begin(), E = M.alias_end(); I != E;
++I) {
if (!I->hasAvailableExternallyLinkage())
continue;
I->setAliasee(nullptr);
I->removeDeadConstantUsers();
I->setLinkage(GlobalValue::ExternalLinkage);
NumAliases++;
}
return Changed;
}