diff options
author | Brian Gaeke <gaeke@uiuc.edu> | 2003-11-05 20:25:33 +0000 |
---|---|---|
committer | Brian Gaeke <gaeke@uiuc.edu> | 2003-11-05 20:25:33 +0000 |
commit | 01f93a4712f4ece817e41a2286a0e19cd2eb91f0 (patch) | |
tree | d4f6b4084497a5bdf897942c20c022cb4067a7ac | |
parent | 095be96096d7137956f0dec2a96b84269defee4f (diff) |
A few handy methods that seem to mesh well with what CallSite already provides.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9737 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/Support/CallSite.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm/Support/CallSite.h b/include/llvm/Support/CallSite.h index fab3b7c896..6811626ccc 100644 --- a/include/llvm/Support/CallSite.h +++ b/include/llvm/Support/CallSite.h @@ -44,6 +44,10 @@ public: return CallSite(); } + /// getType - Return the type of the instruction that generated this call site + /// + const Type *getType () const { return I->getType (); } + /// getInstruction - Return the instruction this call site corresponds to /// Instruction *getInstruction() const { return I; } @@ -83,6 +87,7 @@ public: return I->op_begin()+3; // Skip Function, BB, BB } arg_iterator arg_end() const { return I->op_end(); } + unsigned arg_size() const { return arg_end() - arg_begin(); } bool operator<(const CallSite &CS) const { return getInstruction() < CS.getInstruction(); |