Simplify code.

llvm-svn: 45950
This commit is contained in:
Evan Cheng 2008-01-14 02:38:45 +00:00
parent 26fe7ebc03
commit b9293c51bd
1 changed files with 1 additions and 4 deletions

View File

@ -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<PointerType>(Callee->getType());
const FunctionType *FTy = cast<FunctionType>(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;