From 3c11fb501d64e9e5585e4a45daf379f88f74ee25 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 29 Mar 2002 19:04:19 +0000 Subject: [PATCH] Add more accessors git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2047 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/DerivedTypes.h | 8 ++++++++ 1 file changed, 8 insertions(+) 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 :