diff options
author | Chris Lattner <sabre@nondot.org> | 2002-03-29 19:04:19 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-03-29 19:04:19 +0000 |
commit | 3c11fb501d64e9e5585e4a45daf379f88f74ee25 (patch) | |
tree | 13c1e0a90d19f68d83c4ceff6ae591de3c99f951 /include | |
parent | 7dab15def6a29d86452e69d339e867057bebe6f8 (diff) | |
download | external_llvm-3c11fb501d64e9e5585e4a45daf379f88f74ee25.zip external_llvm-3c11fb501d64e9e5585e4a45daf379f88f74ee25.tar.gz external_llvm-3c11fb501d64e9e5585e4a45daf379f88f74ee25.tar.bz2 |
Add more accessors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2047 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/DerivedTypes.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/llvm/DerivedTypes.h b/include/llvm/DerivedTypes.h index c0d66be..67bb02b 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 : |