[llvm] r242031 - Aliases don't have available_externally linkage.
Rafael Espindola
rafael.espindola at gmail.com
Mon Jul 13 07:39:03 PDT 2015
Author: rafael
Date: Mon Jul 13 09:39:02 2015
New Revision: 242031
URL: http://llvm.org/viewvc/llvm-project?rev=242031&view=rev
Log:
Aliases don't have available_externally linkage.
Allowing that is probably a good idea, but currently we don't, so
this is dead code.
Modified:
llvm/trunk/lib/Transforms/IPO/ElimAvailExtern.cpp
Modified: llvm/trunk/lib/Transforms/IPO/ElimAvailExtern.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/ElimAvailExtern.cpp?rev=242031&r1=242030&r2=242031&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/ElimAvailExtern.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/ElimAvailExtern.cpp Mon Jul 13 09:39:02 2015
@@ -81,16 +81,5 @@ bool EliminateAvailableExternally::runOn
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;
}
More information about the llvm-commits
mailing list