ConstantMerge: update MadeChange when change is made

It was always false, which is obviously wrong.

llvm-svn: 339390
This commit is contained in:
JF Bastien 2018-08-09 21:36:57 +00:00
parent 7f796c787f
commit ebcaa31768
1 changed files with 1 additions and 0 deletions

View File

@ -220,6 +220,7 @@ static bool mergeConstants(Module &M) {
assert(Replacements[i].first->hasLocalLinkage() &&
"Refusing to delete an externally visible global variable.");
Replacements[i].first->eraseFromParent();
MadeChange = true;
}
NumMerged += Replacements.size();