mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
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:
parent
dc3ce836da
commit
a4df7d473f
@ -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(),
|
||||
|
Loading…
Reference in New Issue
Block a user