From ebcaa31768c563782a6a2acee052450cb6497abe Mon Sep 17 00:00:00 2001 From: JF Bastien Date: Thu, 9 Aug 2018 21:36:57 +0000 Subject: [PATCH] ConstantMerge: update MadeChange when change is made It was always false, which is obviously wrong. llvm-svn: 339390 --- llvm/lib/Transforms/IPO/ConstantMerge.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/llvm/lib/Transforms/IPO/ConstantMerge.cpp b/llvm/lib/Transforms/IPO/ConstantMerge.cpp index a6cfbb26e796..d2721c92b333 100644 --- a/llvm/lib/Transforms/IPO/ConstantMerge.cpp +++ b/llvm/lib/Transforms/IPO/ConstantMerge.cpp @@ -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();