Add more accessors
[oota-llvm.git] / include / llvm / DerivedTypes.h
index c0d66bebad72ee7a37962168182d73ef44fdfb9c..67bb02b2e9cfc58c04e761d469e16269efb155df 100644 (file)
@@ -117,6 +117,14 @@ public:
   inline const Type *getReturnType() const { return ResultType; }
   inline const ParamTypes &getParamTypes() const { return ParamTys; }
 
+  // Parameter type accessors...
+  const Type *getParamType(unsigned i) const { return ParamTys[i]; }
+
+  // getNumParams - Return the number of fixed parameters this function type
+  // requires.  This does not consider varargs.
+  //
+  unsigned getNumParams() const { return ParamTys.size(); }
+
 
   virtual const Type *getContainedType(unsigned i) const {
     return i == 0 ? ResultType :