summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/Instructions.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2008-01-14 02:38:45 +0000
committerEvan Cheng <evan.cheng@apple.com>2008-01-14 02:38:45 +0000
commitb9293c51bdd34ed58eca757bf170c6ec0559cbdf (patch)
treec2db8e343e64c6477f1f96787f1ca31655f20622 /llvm/lib/VMCore/Instructions.cpp
parent26fe7ebc03c14a475689d8de6f696cdf59a66195 (diff)
downloadbcm5719-llvm-b9293c51bdd34ed58eca757bf170c6ec0559cbdf.tar.gz
bcm5719-llvm-b9293c51bdd34ed58eca757bf170c6ec0559cbdf.zip
Simplify code.
llvm-svn: 45950
Diffstat (limited to 'llvm/lib/VMCore/Instructions.cpp')
-rw-r--r--llvm/lib/VMCore/Instructions.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/llvm/lib/VMCore/Instructions.cpp b/llvm/lib/VMCore/Instructions.cpp
index a9cc275b548..b569f01d78c 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 {
- 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;
OpenPOWER on IntegriCloud