From c4f72dd6e759a170808ecfc6be784f8598367484 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Thu, 25 Sep 2008 22:42:01 +0000 Subject: [PATCH] Make pointer parameter const for isUsedInBasicBlock. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56625 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Value.h | 2 +- lib/VMCore/Value.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/llvm/Value.h b/include/llvm/Value.h index 1d2c61ea199..f9edba116b5 100644 --- a/include/llvm/Value.h +++ b/include/llvm/Value.h @@ -165,7 +165,7 @@ public: /// bool hasNUsesOrMore(unsigned N) const; - bool isUsedInBasicBlock(BasicBlock *BB) const; + bool isUsedInBasicBlock(const BasicBlock *BB) const; /// getNumUses - This method computes the number of uses of this Value. This /// is a linear time operation. Use hasOneUse, hasNUses, or hasMoreThanNUses diff --git a/lib/VMCore/Value.cpp b/lib/VMCore/Value.cpp index bc5b7a9f81c..d143b6bf97e 100644 --- a/lib/VMCore/Value.cpp +++ b/lib/VMCore/Value.cpp @@ -95,7 +95,7 @@ bool Value::hasNUsesOrMore(unsigned N) const { /// isUsedInBasicBlock - Return true if this value is used in the specified /// basic block. -bool Value::isUsedInBasicBlock(BasicBlock *BB) const { +bool Value::isUsedInBasicBlock(const BasicBlock *BB) const { for (use_const_iterator I = use_begin(), E = use_end(); I != E; ++I) { const Instruction *User = dyn_cast(*I); if (User && User->getParent() == BB)