From: Chris Lattner Date: Fri, 29 Mar 2002 19:04:19 +0000 (+0000) Subject: Add more accessors X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=3c11fb501d64e9e5585e4a45daf379f88f74ee25;p=oota-llvm.git Add more accessors git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2047 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/DerivedTypes.h b/include/llvm/DerivedTypes.h index c0d66bebad7..67bb02b2e9c 100644 --- a/include/llvm/DerivedTypes.h +++ b/include/llvm/DerivedTypes.h @@ -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 :