A few handy methods that seem to mesh well with what CallSite already provides.
authorBrian Gaeke <gaeke@uiuc.edu>
Wed, 5 Nov 2003 20:25:33 +0000 (20:25 +0000)
committerBrian Gaeke <gaeke@uiuc.edu>
Wed, 5 Nov 2003 20:25:33 +0000 (20:25 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9737 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/CallSite.h

index fab3b7c89624b08874789d8261d5d1353936999d..6811626ccc63e71b1558b8bb3205286fb4abb57a 100644 (file)
@@ -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();