Fix unused variable warning for non-asserts builds. NFC.
authorMichael Kuperstein <michael.m.kuperstein@intel.com>
Sun, 4 Jan 2015 13:35:44 +0000 (13:35 +0000)
committerMichael Kuperstein <michael.m.kuperstein@intel.com>
Sun, 4 Jan 2015 13:35:44 +0000 (13:35 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225133 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/ValueTracking.cpp

index 09e71817033ae465679d778808716ddb2c6f317d..48710f715e0e99a93bfc5139d236e3582c7bdd5c 100644 (file)
@@ -485,12 +485,12 @@ static void computeKnownBitsFromAssume(Value *V, APInt &KnownZero,
 
   unsigned BitWidth = KnownZero.getBitWidth();
 
-  Function *F = const_cast<Function*>(Q.CxtI->getParent()->getParent());
   for (auto &AssumeVH : Q.AC->assumptions()) {
     if (!AssumeVH)
       continue;
     CallInst *I = cast<CallInst>(AssumeVH);
-    assert(I->getParent()->getParent() == F &&
+    assert((I->getParent()->getParent() == 
+            const_cast<Function*>(Q.CxtI->getParent()->getParent())) &&
            "Got assumption for the wrong function!");
     if (Q.ExclInvs.count(I))
       continue;