diff options
Diffstat (limited to 'llvm/lib/VMCore')
-rw-r--r-- | llvm/lib/VMCore/Constants.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/VMCore/Function.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/VMCore/Globals.cpp | 4 | ||||
-rw-r--r-- | llvm/lib/VMCore/Instruction.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/VMCore/Value.cpp | 6 |
5 files changed, 8 insertions, 8 deletions
diff --git a/llvm/lib/VMCore/Constants.cpp b/llvm/lib/VMCore/Constants.cpp index 10f88794f5a..c9c98577eb6 100644 --- a/llvm/lib/VMCore/Constants.cpp +++ b/llvm/lib/VMCore/Constants.cpp @@ -160,7 +160,7 @@ bool Constant::canTrap() const { /// isConstantUsed - Return true if the constant has users other than constant /// exprs and other dangling things. bool Constant::isConstantUsed() const { - for (use_const_iterator UI = use_begin(), E = use_end(); UI != E; ++UI) { + for (const_use_iterator UI = use_begin(), E = use_end(); UI != E; ++UI) { const Constant *UC = dyn_cast<Constant>(*UI); if (UC == 0 || isa<GlobalValue>(UC)) return true; diff --git a/llvm/lib/VMCore/Function.cpp b/llvm/lib/VMCore/Function.cpp index 575381e0303..b55a371d690 100644 --- a/llvm/lib/VMCore/Function.cpp +++ b/llvm/lib/VMCore/Function.cpp @@ -404,7 +404,7 @@ Function *Intrinsic::getDeclaration(Module *M, ID id, const Type **Tys, /// hasAddressTaken - returns true if there are any uses of this function /// other than direct calls or invokes to it. bool Function::hasAddressTaken(const User* *PutOffender) const { - for (Value::use_const_iterator I = use_begin(), E = use_end(); I != E; ++I) { + for (Value::const_use_iterator I = use_begin(), E = use_end(); I != E; ++I) { const User *U = *I; if (!isa<CallInst>(U) && !isa<InvokeInst>(U)) return PutOffender ? (*PutOffender = U, true) : true; diff --git a/llvm/lib/VMCore/Globals.cpp b/llvm/lib/VMCore/Globals.cpp index 489ec650e07..b758eb8702a 100644 --- a/llvm/lib/VMCore/Globals.cpp +++ b/llvm/lib/VMCore/Globals.cpp @@ -61,8 +61,8 @@ void GlobalValue::Dematerialize() { /// that want to check to see if a global is unused, but don't want to deal /// with potentially dead constants hanging off of the globals. void GlobalValue::removeDeadConstantUsers() const { - Value::use_const_iterator I = use_begin(), E = use_end(); - Value::use_const_iterator LastNonDeadUser = E; + Value::const_use_iterator I = use_begin(), E = use_end(); + Value::const_use_iterator LastNonDeadUser = E; while (I != E) { if (const Constant *User = dyn_cast<Constant>(*I)) { if (!removeDeadUsersOfConstant(User)) { diff --git a/llvm/lib/VMCore/Instruction.cpp b/llvm/lib/VMCore/Instruction.cpp index 3fabfd07b31..a37fe070bda 100644 --- a/llvm/lib/VMCore/Instruction.cpp +++ b/llvm/lib/VMCore/Instruction.cpp @@ -283,7 +283,7 @@ bool Instruction::isSameOperationAs(const Instruction *I) const { /// specified block. Note that PHI nodes are considered to evaluate their /// operands in the corresponding predecessor block. bool Instruction::isUsedOutsideOfBlock(const BasicBlock *BB) const { - for (use_const_iterator UI = use_begin(), E = use_end(); UI != E; ++UI) { + for (const_use_iterator UI = use_begin(), E = use_end(); UI != E; ++UI) { // PHI nodes uses values in the corresponding predecessor block. For other // instructions, just check to see whether the parent of the use matches up. const PHINode *PN = dyn_cast<PHINode>(*UI); diff --git a/llvm/lib/VMCore/Value.cpp b/llvm/lib/VMCore/Value.cpp index a36d2628250..645dd5a21c7 100644 --- a/llvm/lib/VMCore/Value.cpp +++ b/llvm/lib/VMCore/Value.cpp @@ -86,7 +86,7 @@ Value::~Value() { /// hasNUses - Return true if this Value has exactly N users. /// bool Value::hasNUses(unsigned N) const { - use_const_iterator UI = use_begin(), E = use_end(); + const_use_iterator UI = use_begin(), E = use_end(); for (; N; --N, ++UI) if (UI == E) return false; // Too few. @@ -97,7 +97,7 @@ bool Value::hasNUses(unsigned N) const { /// logically equivalent to getNumUses() >= N. /// bool Value::hasNUsesOrMore(unsigned N) const { - use_const_iterator UI = use_begin(), E = use_end(); + const_use_iterator UI = use_begin(), E = use_end(); for (; N; --N, ++UI) if (UI == E) return false; // Too few. @@ -108,7 +108,7 @@ bool Value::hasNUsesOrMore(unsigned N) const { /// isUsedInBasicBlock - Return true if this value is used in the specified /// basic block. bool Value::isUsedInBasicBlock(const BasicBlock *BB) const { - for (use_const_iterator I = use_begin(), E = use_end(); I != E; ++I) { + for (const_use_iterator I = use_begin(), E = use_end(); I != E; ++I) { const Instruction *User = dyn_cast<Instruction>(*I); if (User && User->getParent() == BB) return true; |