From: Evan Cheng Date: Mon, 14 Jan 2008 02:38:45 +0000 (+0000) Subject: Simplify code. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=42725e7251a75d4df351a4da93b1b6e2ca449aa6;p=oota-llvm.git Simplify code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45950 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/VMCore/Instructions.cpp b/lib/VMCore/Instructions.cpp index a9cc275b548..b569f01d78c 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 { - const Value *Callee = getCalledValue(); - const PointerType *CalleeTy = cast(Callee->getType()); - const FunctionType *FTy = cast(CalleeTy->getElementType()); - for (unsigned i = 1, e = FTy->getNumParams()+1; i != e; ++i) + for (unsigned i = 1, e = getNumOperands(); i != e; ++i) if (paramHasAttr(i, ParamAttr::ByVal)) return true; return false;