diff options
| author | Chris Lattner <sabre@nondot.org> | 2007-01-21 23:09:17 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2007-01-21 23:09:17 +0000 |
| commit | 2e89ebbcc85541d0fa2c5896ad9d4879b8701483 (patch) | |
| tree | a4a509364377ade1ccab21e3d676285ac3af1cda | |
| parent | 3a386e2fa8dc53a51160980e12e30ef5d276dc33 (diff) | |
| download | bcm5719-llvm-2e89ebbcc85541d0fa2c5896ad9d4879b8701483.tar.gz bcm5719-llvm-2e89ebbcc85541d0fa2c5896ad9d4879b8701483.zip | |
add accessor
llvm-svn: 39259
| -rw-r--r-- | clang/include/clang/AST/Decl.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/include/clang/AST/Decl.h b/clang/include/clang/AST/Decl.h index 9756b4dfed2..0accdc1639c 100644 --- a/clang/include/clang/AST/Decl.h +++ b/clang/include/clang/AST/Decl.h @@ -147,6 +147,10 @@ public: void setDeclChain(Decl *D) { DeclChain = D; } unsigned getNumParams() const; + VarDecl *getParamDecl(unsigned i) const { + assert(i < getNumParams() && "Illegal param #"); + return ParamInfo[i]; + } void setParams(VarDecl **NewParamInfo, unsigned NumParams); // Implement isa/cast/dyncast/etc. |

