From 88e2b780cbac5b5902e1c2813f3e920286b6d9a8 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 12 Jul 2004 20:27:31 +0000 Subject: Fix a really nasty logic error that VC noticed. Reid, this might matter to you :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14774 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/VMCore/Function.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/VMCore/Function.cpp b/lib/VMCore/Function.cpp index 79384f9..d12c4dd 100644 --- a/lib/VMCore/Function.cpp +++ b/lib/VMCore/Function.cpp @@ -84,8 +84,8 @@ void Argument::setParent(Function *parent) { static bool removeDeadConstantUsers(Constant *C) { while (!C->use_empty()) { - if (Constant *C = dyn_cast(C->use_back())) { - if (!removeDeadConstantUsers(C)) + if (Constant *CU = dyn_cast(C->use_back())) { + if (!removeDeadConstantUsers(CU)) return false; // Constant wasn't dead. } else { return false; // Nonconstant user of the global. -- cgit v1.1