diff options
author | Kazu Hirata <kazu@google.com> | 2021-11-05 19:39:06 -0700 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2021-11-05 19:39:07 -0700 |
commit | 87e53a0ad8557162bc074e982df914beb9afa84d (patch) | |
tree | 59151239bc89a13654fe5118293afe9fda3ff2cd /llvm/lib/IR/Value.cpp | |
parent | ca1a8be06b230192ff37109be51c0a1daaff3e56 (diff) | |
download | llvm-87e53a0ad8557162bc074e982df914beb9afa84d.zip llvm-87e53a0ad8557162bc074e982df914beb9afa84d.tar.gz llvm-87e53a0ad8557162bc074e982df914beb9afa84d.tar.bz2 |
[llvm] Use make_early_inc_range (NFC)
Diffstat (limited to 'llvm/lib/IR/Value.cpp')
-rw-r--r-- | llvm/lib/IR/Value.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/IR/Value.cpp b/llvm/lib/IR/Value.cpp index 4136a9a..b475c83 100644 --- a/llvm/lib/IR/Value.cpp +++ b/llvm/lib/IR/Value.cpp @@ -546,9 +546,7 @@ void Value::replaceUsesWithIf(Value *New, SmallVector<TrackingVH<Constant>, 8> Consts; SmallPtrSet<Constant *, 8> Visited; - for (use_iterator UI = use_begin(), E = use_end(); UI != E;) { - Use &U = *UI; - ++UI; + for (Use &U : llvm::make_early_inc_range(uses())) { if (!ShouldReplace(U)) continue; // Must handle Constants specially, we cannot call replaceUsesOfWith on a |