aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-07-12 20:27:31 +0000
committerChris Lattner <sabre@nondot.org>2004-07-12 20:27:31 +0000
commit88e2b780cbac5b5902e1c2813f3e920286b6d9a8 (patch)
tree301f66d12abfd5b49e9f29e3735738660f026b30 /lib/VMCore
parent268f2583b90ee28b4685a5772558ad0c6d3d4c18 (diff)
downloadexternal_llvm-88e2b780cbac5b5902e1c2813f3e920286b6d9a8.zip
external_llvm-88e2b780cbac5b5902e1c2813f3e920286b6d9a8.tar.gz
external_llvm-88e2b780cbac5b5902e1c2813f3e920286b6d9a8.tar.bz2
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
Diffstat (limited to 'lib/VMCore')
-rw-r--r--lib/VMCore/Function.cpp4
1 files 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<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.