1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00

An even better fix.

llvm-svn: 35998
This commit is contained in:
Jeff Cohen 2007-04-14 17:18:29 +00:00
parent 61b2bc63f3
commit 6e724c5338

View File

@ -65,9 +65,8 @@ bool ConstantMerge::runOnModule(Module &M) {
// If this GV is dead, remove it.
GV->removeDeadConstantUsers();
if (GV->use_empty() && GV->hasInternalLinkage()) {
(GV++)->eraseFromParent();
if (GV == E)
break;
GV->eraseFromParent();
continue;
}
// Only process constants with initializers.