diff options
| author | Matthijs Kooijman <matthijs@stdin.nl> | 2008-06-05 08:04:58 +0000 |
|---|---|---|
| committer | Matthijs Kooijman <matthijs@stdin.nl> | 2008-06-05 08:04:58 +0000 |
| commit | b0dffd691ce4b017593fcd8994e24fb151937cd7 (patch) | |
| tree | 5f234ff53c81940889125b38982c72d26571d0e2 | |
| parent | 6cb64030e57530678b5b05c50b0f88ca241d5c17 (diff) | |
| download | bcm5719-llvm-b0dffd691ce4b017593fcd8994e24fb151937cd7.tar.gz bcm5719-llvm-b0dffd691ce4b017593fcd8994e24fb151937cd7.zip | |
* Make CallSite::hasArgument const and let it take a const parameter.
llvm-svn: 51989
| -rw-r--r-- | llvm/include/llvm/Support/CallSite.h | 2 | ||||
| -rw-r--r-- | llvm/lib/VMCore/Instructions.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/llvm/include/llvm/Support/CallSite.h b/llvm/include/llvm/Support/CallSite.h index 513269fb5f8..9a6c00872ba 100644 --- a/llvm/include/llvm/Support/CallSite.h +++ b/llvm/include/llvm/Support/CallSite.h @@ -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... diff --git a/llvm/lib/VMCore/Instructions.cpp b/llvm/lib/VMCore/Instructions.cpp index d78926742cf..f66076d24e8 100644 --- a/llvm/lib/VMCore/Instructions.cpp +++ b/llvm/lib/VMCore/Instructions.cpp @@ -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; |

