mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-19 20:34:38 +00:00
Fix a bug John tracked down in libstdc++ where we were incorrectly deleting
weak functions. Thanks for finding this John! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16997 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
59e12ed789
commit
b23cd2f688
@ -808,7 +808,8 @@ bool GlobalOpt::runOnModule(Module &M) {
|
|||||||
for (Module::iterator FI = M.begin(), E = M.end(); FI != E; ) {
|
for (Module::iterator FI = M.begin(), E = M.end(); FI != E; ) {
|
||||||
Function *F = FI++;
|
Function *F = FI++;
|
||||||
F->removeDeadConstantUsers();
|
F->removeDeadConstantUsers();
|
||||||
if (F->use_empty() && (F->hasInternalLinkage() || F->hasWeakLinkage())) {
|
if (F->use_empty() && (F->hasInternalLinkage() ||
|
||||||
|
F->hasLinkOnceLinkage())) {
|
||||||
M.getFunctionList().erase(F);
|
M.getFunctionList().erase(F);
|
||||||
LocalChange = true;
|
LocalChange = true;
|
||||||
++NumFnDeleted;
|
++NumFnDeleted;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user