[llvm] r225133 - Fix unused variable warning for non-asserts builds. NFC.

Michael Kuperstein michael.m.kuperstein at intel.com
Sun Jan 4 05:35:44 PST 2015


Author: mkuper
Date: Sun Jan  4 07:35:44 2015
New Revision: 225133

URL: http://llvm.org/viewvc/llvm-project?rev=225133&view=rev
Log:
Fix unused variable warning for non-asserts builds. NFC.

Modified:
    llvm/trunk/lib/Analysis/ValueTracking.cpp

Modified: llvm/trunk/lib/Analysis/ValueTracking.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ValueTracking.cpp?rev=225133&r1=225132&r2=225133&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ValueTracking.cpp (original)
+++ llvm/trunk/lib/Analysis/ValueTracking.cpp Sun Jan  4 07:35:44 2015
@@ -485,12 +485,12 @@ static void computeKnownBitsFromAssume(V
 
   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;





More information about the llvm-commits mailing list