[llvm] a9eb3fd - [SCEV] Fix warning (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 2 05:48:37 PDT 2024
Author: Nikita Popov
Date: 2024-08-02T14:48:29+02:00
New Revision: a9eb3fd79b96ea6d954b1aa9a3de81d260d712ae
URL: https://github.com/llvm/llvm-project/commit/a9eb3fd79b96ea6d954b1aa9a3de81d260d712ae
DIFF: https://github.com/llvm/llvm-project/commit/a9eb3fd79b96ea6d954b1aa9a3de81d260d712ae.diff
LOG: [SCEV] Fix warning (NFC)
Produces -Wrange-loop-construct on some buildbots.
Added:
Modified:
llvm/lib/Analysis/ScalarEvolution.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp
index b6c70451b9b06..a5ebd5c554c3d 100644
--- a/llvm/lib/Analysis/ScalarEvolution.cpp
+++ b/llvm/lib/Analysis/ScalarEvolution.cpp
@@ -11979,7 +11979,7 @@ ScalarEvolution::computeConstantDifference(const SCEV *More, const SCEV *Less) {
Decompose(Less, -1);
// Check whether all the non-constants cancel out.
- for (const auto [_, Mul] : Multiplicity)
+ for (const auto &[_, Mul] : Multiplicity)
if (Mul != 0)
return std::nullopt;
More information about the llvm-commits
mailing list