From 58c3f6cc3112ed5ca71d7e5b1321ef62eba78e33 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. llvm-svn: 225133 --- llvm/lib/Analysis/ValueTracking.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp index 09e71817033a..48710f715e0e 100644 --- a/llvm/lib/Analysis/ValueTracking.cpp +++ b/llvm/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;