aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/Transforms/Scalar/GVNSink.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Scalar/GVNSink.cpp b/llvm/lib/Transforms/Scalar/GVNSink.cpp
index ddf01dc..95a4c64 100644
--- a/llvm/lib/Transforms/Scalar/GVNSink.cpp
+++ b/llvm/lib/Transforms/Scalar/GVNSink.cpp
@@ -267,13 +267,13 @@ public:
};
assert(llvm::is_sorted(Blocks, ComesBefore));
int C = 0;
- llvm::for_each(Values, [&C, this](const Value *V) {
+ for (const Value *V : Values) {
if (!isa<UndefValue>(V)) {
- const Instruction *I = cast<Instruction>(V);
- assert(I->getParent() == this->Blocks[C]);
+ assert(cast<Instruction>(V)->getParent() == Blocks[C]);
+ (void)C;
}
C++;
- });
+ }
}
/// Create a PHI from an array of incoming values and incoming blocks.
ModelledPHI(SmallVectorImpl<Instruction *> &V,