diff options
Diffstat (limited to 'include/llvm/Support/CallSite.h')
-rw-r--r-- | include/llvm/Support/CallSite.h | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/include/llvm/Support/CallSite.h b/include/llvm/Support/CallSite.h index 0650b61fbc..7667ba03e3 100644 --- a/include/llvm/Support/CallSite.h +++ b/include/llvm/Support/CallSite.h @@ -255,27 +255,21 @@ public: private: /// Returns the operand number of the first argument unsigned getArgumentOffset() const { - if (isCall()) - return 1; // Skip Function (ATM) - else return 0; // Args are at the front } unsigned getArgumentEndOffset() const { if (isCall()) - return 0; // Unchanged (ATM) + return 1; // Skip Function else return 3; // Skip BB, BB, Function } IterTy getCallee() const { - // FIXME: this is slow, since we do not have the fast versions - // of the op_*() functions here. See CallSite::getCallee. - // - if (isCall()) - return getInstruction()->op_begin(); // Unchanged (ATM) - else - return getInstruction()->op_end() - 3; // Skip BB, BB, Function + // FIXME: this is slow, since we do not have the fast versions + // of the op_*() functions here. See CallSite::getCallee. + // + return arg_end(); } }; |