Skip to content

Commit d6e65a6

Browse files
committed
Fix a warning. [-Wunused-but-set-variable]
1 parent 08af115 commit d6e65a6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -577,8 +577,8 @@ static Value *findBaseDefiningValue(Value *I, DefiningValueMapTy &Cache,
577577
return I;
578578
}
579579

580-
if (auto *RMWI = dyn_cast<AtomicRMWInst>(I)) {
581-
assert(RMWI->getOperation() == AtomicRMWInst::Xchg &&
580+
if (isa<AtomicRMWInst>(I)) {
581+
assert(cast<AtomicRMWInst>(I)->getOperation() == AtomicRMWInst::Xchg &&
582582
"Only Xchg is allowed for pointer values");
583583
// A RMW Xchg is a combined atomic load and store, so we can treat the
584584
// loaded value as a base pointer.

0 commit comments

Comments
 (0)