[llvm] r225143 - [PM] Cleanup a const_cast and other machinery left over in this code

Chandler Carruth chandlerc at gmail.com
Sun Jan 4 15:13:57 PST 2015


Author: chandlerc
Date: Sun Jan  4 17:13:57 2015
New Revision: 225143

URL: http://llvm.org/viewvc/llvm-project?rev=225143&view=rev
Log:
[PM] Cleanup a const_cast and other machinery left over in this code
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.

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=225143&r1=225142&r2=225143&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ValueTracking.cpp (original)
+++ llvm/trunk/lib/Analysis/ValueTracking.cpp Sun Jan  4 17:13:57 2015
@@ -489,8 +489,7 @@ static void computeKnownBitsFromAssume(V
     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;





More information about the llvm-commits mailing list