diff options
| author | Evan Cheng <evan.cheng@apple.com> | 2008-01-14 02:38:45 +0000 |
|---|---|---|
| committer | Evan Cheng <evan.cheng@apple.com> | 2008-01-14 02:38:45 +0000 |
| commit | 42725e7251a75d4df351a4da93b1b6e2ca449aa6 (patch) | |
| tree | 71ba34a2b681828860a9665cfe84eed0133c3c49 /lib/VMCore | |
| parent | 941db495b8233a3753ce72a84021f677073ff4ea (diff) | |
| download | external_llvm-42725e7251a75d4df351a4da93b1b6e2ca449aa6.zip external_llvm-42725e7251a75d4df351a4da93b1b6e2ca449aa6.tar.gz external_llvm-42725e7251a75d4df351a4da93b1b6e2ca449aa6.tar.bz2 | |
Simplify code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45950 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
| -rw-r--r-- | lib/VMCore/Instructions.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/VMCore/Instructions.cpp b/lib/VMCore/Instructions.cpp index a9cc275..b569f01 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<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; |
