[llvm-commits] [llvm] r45974 - /llvm/trunk/lib/VMCore/Instructions.cpp
Duncan Sands
baldrick at free.fr
Mon Jan 14 11:57:00 PST 2008
Author: baldrick
Date: Mon Jan 14 13:57:00 2008
New Revision: 45974
URL: http://llvm.org/viewvc/llvm-project?rev=45974&view=rev
Log:
Simplify CallInst::hasByValArgument using a new method.
Modified:
llvm/trunk/lib/VMCore/Instructions.cpp
Modified: llvm/trunk/lib/VMCore/Instructions.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Instructions.cpp?rev=45974&r1=45973&r2=45974&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Instructions.cpp (original)
+++ llvm/trunk/lib/VMCore/Instructions.cpp Mon Jan 14 13:57:00 2008
@@ -406,10 +406,7 @@
/// @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) {
More information about the llvm-commits
mailing list