From: Arthur Eubanks Date: Tue, 25 Apr 2023 22:07:40 +0000 (-0700) Subject: [SCCP] Properly report modifications when deleting globals X-Git-Tag: upstream/17.0.6~10431 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5ecdc8147b0e1def0aa9c8eebff85b67f36e8766;p=platform%2Fupstream%2Fllvm.git [SCCP] Properly report modifications when deleting globals Detected by an upcoming change. --- diff --git a/llvm/lib/Transforms/IPO/SCCP.cpp b/llvm/lib/Transforms/IPO/SCCP.cpp index 2174827..5e2a23b 100644 --- a/llvm/lib/Transforms/IPO/SCCP.cpp +++ b/llvm/lib/Transforms/IPO/SCCP.cpp @@ -366,8 +366,8 @@ static bool runIPSCCP( while (!GV->use_empty()) { StoreInst *SI = cast(GV->user_back()); SI->eraseFromParent(); - MadeChanges = true; } + MadeChanges = true; M.eraseGlobalVariable(GV); ++NumGlobalConst; }