mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 04:30:23 +00:00
Preserve aliases if needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125439 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d800cf0a50
commit
2e3066b319
@ -367,6 +367,14 @@ void LTOCodeGenerator::applyScopeRestrictions() {
|
||||
_mustPreserveSymbols.count(Buffer))
|
||||
mustPreserveList.push_back(::strdup(v->getNameStr().c_str()));
|
||||
}
|
||||
for (Module::alias_iterator a = mergedModule->alias_begin(),
|
||||
e = mergedModule->alias_end(); a != e; ++a) {
|
||||
Buffer.clear();
|
||||
mangler.getNameWithPrefix(Buffer, a, false);
|
||||
if (!a->isDeclaration() &&
|
||||
_mustPreserveSymbols.count(Buffer))
|
||||
mustPreserveList.push_back(::strdup(a->getNameStr().c_str()));
|
||||
}
|
||||
passes.add(createInternalizePass(mustPreserveList));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user