mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
remove a layer of cruft
llvm-svn: 109821
This commit is contained in:
parent
82701d8dfe
commit
d85a524ba1
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user