aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Support/CallSite.h
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2010-07-16 09:38:02 +0000
committerGabor Greif <ggreif@gmail.com>2010-07-16 09:38:02 +0000
commit414c6c091ce59a65c7dff605e43a05b89aa0792d (patch)
tree3e7c2b5a7329eab2f2db6cd575a6da0e0aa5812a /include/llvm/Support/CallSite.h
parentd557b954a8fb8f563779d364bdce33e62885af2f (diff)
downloadexternal_llvm-414c6c091ce59a65c7dff605e43a05b89aa0792d.zip
external_llvm-414c6c091ce59a65c7dff605e43a05b89aa0792d.tar.gz
external_llvm-414c6c091ce59a65c7dff605e43a05b89aa0792d.tar.bz2
eliminate CallInst::ArgOffset
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108522 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/CallSite.h')
-rw-r--r--include/llvm/Support/CallSite.h16
1 files changed, 6 insertions, 10 deletions
diff --git a/include/llvm/Support/CallSite.h b/include/llvm/Support/CallSite.h
index 38ee08b..cce000d 100644
--- a/include/llvm/Support/CallSite.h
+++ b/include/llvm/Support/CallSite.h
@@ -254,18 +254,16 @@ public:
private:
/// Returns the operand number of the first argument
+ /// FIXME: remove this func!
unsigned getArgumentOffset() const {
- if (isCall())
- return CallInst::ArgOffset; // Skip Function (ATM)
- else
- return 0; // Args are at the front
+ return 0; // Args are at the front
}
unsigned getArgumentEndOffset() const {
if (isCall())
- return CallInst::ArgOffset ? 0 : 1; // Unchanged (ATM)
+ return 1; // Skip Callee
else
- return 3; // Skip BB, BB, Function
+ return 3; // Skip BB, BB, Callee
}
IterTy getCallee() const {
@@ -273,11 +271,9 @@ private:
// of the op_*() functions here. See CallSite::getCallee.
//
if (isCall())
- return CallInst::ArgOffset
- ? getInstruction()->op_begin() // Unchanged
- : getInstruction()->op_end() - 1; // Skip Function
+ return getInstruction()->op_end() - 1; // Skip Callee
else
- return getInstruction()->op_end() - 3; // Skip BB, BB, Function
+ return getInstruction()->op_end() - 3; // Skip BB, BB, Callee
}
};