[PM] Cleanup a const_cast and other machinery left over in this code
authorChandler Carruth <chandlerc@gmail.com>
Sun, 4 Jan 2015 23:13:57 +0000 (23:13 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Sun, 4 Jan 2015 23:13:57 +0000 (23:13 +0000)
from before I removed thet non-const use of the function.

The unused variable that held the const_cast was already kindly removed
by Michael.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225143 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/ValueTracking.cpp

index 48710f715e0e99a93bfc5139d236e3582c7bdd5c..bba2f9f2735c8328062f9036a6ad224481714b78 100644 (file)
@@ -489,8 +489,7 @@ static void computeKnownBitsFromAssume(Value *V, APInt &KnownZero,
     if (!AssumeVH)
       continue;
     CallInst *I = cast<CallInst>(AssumeVH);
-    assert((I->getParent()->getParent() == 
-            const_cast<Function*>(Q.CxtI->getParent()->getParent())) &&
+    assert(I->getParent()->getParent() == Q.CxtI->getParent()->getParent() &&
            "Got assumption for the wrong function!");
     if (Q.ExclInvs.count(I))
       continue;