From 38987c1dcc5b66adaaa4281d3fd7c19bd2e2df71 Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Mon, 14 Jan 2008 19:57:00 +0000 Subject: [PATCH] Simplify CallInst::hasByValArgument using a new method. llvm-svn: 45974 --- llvm/lib/VMCore/Instructions.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/llvm/lib/VMCore/Instructions.cpp b/llvm/lib/VMCore/Instructions.cpp index b569f01d78c0..ca9ea3bfa3be 100644 --- a/llvm/lib/VMCore/Instructions.cpp +++ b/llvm/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) {