forked from OSchip/llvm-project
Fix a really nasty logic error that VC noticed.
Reid, this might matter to you :) llvm-svn: 14774
This commit is contained in:
parent
049bb9e8d8
commit
534d252330
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue