RewriteStatepointsForGC.cpp: Fix for -Asserts. [-Wunused-variable]
authorNAKAMURA Takumi <geek4civic@gmail.com>
Sun, 22 Feb 2015 09:58:13 +0000 (09:58 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Sun, 22 Feb 2015 09:58:13 +0000 (09:58 +0000)
llvm-svn: 230168

llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp

index 8aae0e6..21452d6 100644 (file)
@@ -1305,8 +1305,7 @@ makeStatepointExplicitImpl(const CallSite &CS, /* to replace */
     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())));
     }
   }