diff options
author | Gabor Greif <ggreif@gmail.com> | 2010-07-29 23:35:00 +0000 |
---|---|---|
committer | Gabor Greif <ggreif@gmail.com> | 2010-07-29 23:35:00 +0000 |
commit | 436ed471cc70f632dbcd1e82cb8e90d2c0f91ccd (patch) | |
tree | 28be92f3356726da4d48248ac176239c8a0f6440 /include/llvm/Support/CallSite.h | |
parent | 07f4eda3a524bdc245a088dc90a71583234273b9 (diff) | |
download | llvm-436ed471cc70f632dbcd1e82cb8e90d2c0f91ccd.tar.gz llvm-436ed471cc70f632dbcd1e82cb8e90d2c0f91ccd.tar.bz2 llvm-436ed471cc70f632dbcd1e82cb8e90d2c0f91ccd.tar.xz |
remove a layer of cruft
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109821 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/CallSite.h')
-rw-r--r-- | include/llvm/Support/CallSite.h | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/include/llvm/Support/CallSite.h b/include/llvm/Support/CallSite.h index c2d78b17a4..d66e3cb6e4 100644 --- a/include/llvm/Support/CallSite.h +++ b/include/llvm/Support/CallSite.h @@ -116,13 +116,13 @@ public: ValTy *getArgument(unsigned ArgNo) const { assert(arg_begin() + ArgNo < arg_end() && "Argument # out of range!"); - return *(arg_begin()+ArgNo); + return *(arg_begin() + ArgNo); } void setArgument(unsigned ArgNo, Value* newVal) { assert(getInstruction() && "Not a call or invoke instruction!"); assert(arg_begin() + ArgNo < arg_end() && "Argument # out of range!"); - getInstruction()->setOperand(getArgumentOffset() + ArgNo, newVal); + getInstruction()->setOperand(ArgNo, newVal); } /// Given a value use iterator, returns the argument that corresponds to it. @@ -143,7 +143,7 @@ public: IterTy arg_begin() const { assert(getInstruction() && "Not a call or invoke instruction!"); // Skip non-arguments - return (*this)->op_begin() + getArgumentOffset(); + return (*this)->op_begin(); } IterTy arg_end() const { return (*this)->op_end() - getArgumentEndOffset(); } @@ -253,12 +253,6 @@ public: } private: - /// Returns the operand number of the first argument - /// FIXME: remove this func! - unsigned getArgumentOffset() const { - return 0; // Args are at the front - } - unsigned getArgumentEndOffset() const { if (isCall()) return 1; // Skip Callee |