1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00

Fix a really nasty logic error that VC noticed.

Reid, this might matter to you :)

llvm-svn: 14774
This commit is contained in:
Chris Lattner 2004-07-12 20:27:31 +00:00
parent 528291513f
commit d581590c73

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.