Aliases are always definition, delete dead code.

While at it, use a range loop.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209519 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola 2014-05-23 15:18:06 +00:00
parent dc3ce836da
commit a4df7d473f

View File

@ -800,14 +800,8 @@ bool LTOModule::parseSymbols(std::string &errMsg) {
return true;
// add aliases
for (Module::alias_iterator a = _module->alias_begin(),
e = _module->alias_end(); a != e; ++a) {
if (isDeclaration(*a->getAliasee()))
// Is an alias to a declaration.
addPotentialUndefinedSymbol(a, false);
else
addDefinedDataSymbol(a);
}
for (const auto &Alias : _module->aliases())
addDefinedDataSymbol(&Alias);
// make symbols for all undefines
for (StringMap<NameAndAttributes>::iterator u =_undefines.begin(),