[llvm-commits] [llvm] r51989 - in /llvm/trunk: include/llvm/Support/CallSite.h lib/VMCore/Instructions.cpp
Matthijs Kooijman
matthijs at stdin.nl
Thu Jun 5 01:04:58 PDT 2008
Author: matthijs
Date: Thu Jun 5 03:04:58 2008
New Revision: 51989
URL: http://llvm.org/viewvc/llvm-project?rev=51989&view=rev
Log:
* Make CallSite::hasArgument const and let it take a const parameter.
Modified:
llvm/trunk/include/llvm/Support/CallSite.h
llvm/trunk/lib/VMCore/Instructions.cpp
Modified: llvm/trunk/include/llvm/Support/CallSite.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/CallSite.h?rev=51989&r1=51988&r2=51989&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/CallSite.h (original)
+++ llvm/trunk/include/llvm/Support/CallSite.h Thu Jun 5 03:04:58 2008
@@ -132,7 +132,7 @@
/// 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...
Modified: llvm/trunk/lib/VMCore/Instructions.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Instructions.cpp?rev=51989&r1=51988&r2=51989&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Instructions.cpp (original)
+++ llvm/trunk/lib/VMCore/Instructions.cpp Thu Jun 5 03:04:58 2008
@@ -91,7 +91,7 @@
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;
More information about the llvm-commits
mailing list