[llvm-commits] [llvm] r109821 - /llvm/trunk/include/llvm/Support/CallSite.h
Gabor Greif
ggreif at gmail.com
Thu Jul 29 16:35:00 PDT 2010
Author: ggreif
Date: Thu Jul 29 18:35:00 2010
New Revision: 109821
URL: http://llvm.org/viewvc/llvm-project?rev=109821&view=rev
Log:
remove a layer of cruft
Modified:
llvm/trunk/include/llvm/Support/CallSite.h
Modified: llvm/trunk/include/llvm/Support/CallSite.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/CallSite.h?rev=109821&r1=109820&r2=109821&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/CallSite.h (original)
+++ llvm/trunk/include/llvm/Support/CallSite.h Thu Jul 29 18:35:00 2010
@@ -116,13 +116,13 @@
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 @@
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 @@
}
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
More information about the llvm-commits
mailing list