RewriteStatepointsForGC.cpp: Fix for -Asserts. [-Wunused-variable]
llvm-svn: 230168
diff --git a/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp b/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
index 8aae0e6..21452d6 100644
--- a/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
+++ b/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
@@ -1305,8 +1305,7 @@
assert((toReplace->hasNUses(0) || toReplace->hasNUses(1)) &&
"only valid use before rewrite is gc.result");
if (toReplace->hasOneUse()) {
- Instruction *GCResult = cast<Instruction>(*toReplace->user_begin());
- assert(isGCResult(GCResult));
+ assert(isGCResult(cast<Instruction>(*toReplace->user_begin())));
}
}