From 736231912066c95f033ad46db3232a7880df51ca Mon Sep 17 00:00:00 2001 From: Michael Kuperstein Date: Sun, 4 Jan 2015 13:35:44 +0000 Subject: [PATCH] Fix unused variable warning for non-asserts builds. NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225133 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/ValueTracking.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Analysis/ValueTracking.cpp b/lib/Analysis/ValueTracking.cpp index 09e71817033..48710f715e0 100644 --- a/lib/Analysis/ValueTracking.cpp +++ b/lib/Analysis/ValueTracking.cpp @@ -485,12 +485,12 @@ static void computeKnownBitsFromAssume(Value *V, APInt &KnownZero, unsigned BitWidth = KnownZero.getBitWidth(); - Function *F = const_cast(Q.CxtI->getParent()->getParent()); for (auto &AssumeVH : Q.AC->assumptions()) { if (!AssumeVH) continue; CallInst *I = cast(AssumeVH); - assert(I->getParent()->getParent() == F && + assert((I->getParent()->getParent() == + const_cast(Q.CxtI->getParent()->getParent())) && "Got assumption for the wrong function!"); if (Q.ExclInvs.count(I)) continue;