From a8fe39eb2b955253c113162533d62b555f389de7 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 18 Jul 2007 17:50:10 +0000 Subject: [PATCH] add accessors git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40005 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/AST/Decl.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/clang/AST/Decl.h b/include/clang/AST/Decl.h index 80474cde2a..b37ab1f99f 100644 --- a/include/clang/AST/Decl.h +++ b/include/clang/AST/Decl.h @@ -424,6 +424,12 @@ public: bool hasFlexibleArrayMember() const { return HasFlexibleArrayMember; } void setHasFlexibleArrayMember(bool V) { HasFlexibleArrayMember = V; } + + /// getNumMembers - Return the number of members, or -1 if this is a forward + /// definition. + int getNumMembers() const { return NumMembers; } + const FieldDecl *getMember(unsigned i) const { return Members[i]; } + FieldDecl *getMember(unsigned i) { return Members[i]; } /// defineBody - When created, RecordDecl's correspond to a forward declared /// record. This method is used to mark the decl as being defined, with the