forked from OSchip/llvm-project
parent
a9aad5685b
commit
4bd0fd367a
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue