From 0c374216232bfb36e79c90ff0f1a88fa038db5f9 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. llvm-svn: 56625 --- llvm/include/llvm/Value.h | 2 +- llvm/lib/VMCore/Value.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/include/llvm/Value.h b/llvm/include/llvm/Value.h index 1d2c61ea1991..f9edba116b5f 100644 --- a/llvm/include/llvm/Value.h +++ b/llvm/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/llvm/lib/VMCore/Value.cpp b/llvm/lib/VMCore/Value.cpp index bc5b7a9f81cb..d143b6bf97e8 100644 --- a/llvm/lib/VMCore/Value.cpp +++ b/llvm/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)