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
This commit is contained in:
Chris Lattner 2004-07-12 20:27:31 +00:00
parent 268f2583b9
commit 88e2b780cb

View File

@ -84,8 +84,8 @@ void Argument::setParent(Function *parent) {
static bool removeDeadConstantUsers(Constant *C) {
while (!C->use_empty()) {
if (Constant *C = dyn_cast<Constant>(C->use_back())) {
if (!removeDeadConstantUsers(C))
if (Constant *CU = dyn_cast<Constant>(C->use_back())) {
if (!removeDeadConstantUsers(CU))
return false; // Constant wasn't dead.
} else {
return false; // Nonconstant user of the global.