aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2008-01-14 19:57:00 +0000
committerDuncan Sands <baldrick@free.fr>2008-01-14 19:57:00 +0000
commit15ea48c9ce79518d26e52b37cacee54b0b3b2e64 (patch)
tree0b9df78d34be35167a30e2bc1ab26678450a6239 /lib
parentb0c9b93bb4c591b1cec0491eec34f792cd3cf111 (diff)
Simplify CallInst::hasByValArgument using a new method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45974 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/VMCore/Instructions.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/VMCore/Instructions.cpp b/lib/VMCore/Instructions.cpp
index b569f01d78..ca9ea3bfa3 100644
--- a/lib/VMCore/Instructions.cpp
+++ b/lib/VMCore/Instructions.cpp
@@ -406,10 +406,7 @@ bool CallInst::isStructReturn() const {
/// @brief Determine if any call argument is an aggregate passed by value.
bool CallInst::hasByValArgument() const {
- for (unsigned i = 1, e = getNumOperands(); i != e; ++i)
- if (paramHasAttr(i, ParamAttr::ByVal))
- return true;
- return false;
+ return ParamAttrs && ParamAttrs->hasAttrSomewhere(ParamAttr::ByVal);
}
void CallInst::setDoesNotThrow(bool doesNotThrow) {