* Make CallSite::hasArgument const and let it take a const parameter.
authorMatthijs Kooijman <matthijs@stdin.nl>
Thu, 5 Jun 2008 08:04:58 +0000 (08:04 +0000)
committerMatthijs Kooijman <matthijs@stdin.nl>
Thu, 5 Jun 2008 08:04:58 +0000 (08:04 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51989 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/CallSite.h
lib/VMCore/Instructions.cpp

index 513269fb5f84d5bdc3766a0c1c70ce608ca808cd..9a6c00872ba1642652e9d222da8f640c78c0bb9c 100644 (file)
@@ -132,7 +132,7 @@ public:
   
   /// hasArgument - Returns true if this CallSite passes the given Value* as an
   /// argument to the called function.
-  bool hasArgument(Value *Arg);
+  bool hasArgument(const Value *Arg) const;
 
   /// arg_iterator - The type of iterator to use when looping over actual
   /// arguments at this call site...
index d78926742cf3e0d2fd81f53c85b4d0b2753badd8..f66076d24e864730f53c40478c455149477d0334 100644 (file)
@@ -91,7 +91,7 @@ void CallSite::setDoesNotThrow(bool doesNotThrow) {
     cast<InvokeInst>(I)->setDoesNotThrow(doesNotThrow);
 }
 
-bool CallSite::hasArgument(Value *Arg) {
+bool CallSite::hasArgument(const Value *Arg) const {
   for (arg_iterator AI = this->arg_begin(), E = this->arg_end(); AI != E; ++AI)
     if (AI->get() == Arg)
       return true;