From cc1f8693df4c96d7a8db585e5c05e31b8520f6c2 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 28 Mar 2009 07:00:38 +0000 Subject: [PATCH] add accessors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67929 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/AST/DeclGroup.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/clang/AST/DeclGroup.h b/include/clang/AST/DeclGroup.h index c9d0d655cb..3a57281bc0 100644 --- a/include/clang/AST/DeclGroup.h +++ b/include/clang/AST/DeclGroup.h @@ -93,7 +93,6 @@ public: return const_cast(this)->getDeclGroup(); } - iterator begin() { if (isSingleDecl()) return D ? &D : 0; @@ -120,6 +119,13 @@ public: return &G[0] + G.size(); } + void *getAsOpaquePtr() const { return D; } + static DeclGroupRef getFromOpaquePtr(void *Ptr) { + DeclGroupRef X; + X.D = static_cast(Ptr); + return X; + } + /// Emit - Serialize a DeclGroupRef to Bitcode. void Emit(llvm::Serializer& S) const; -- 2.40.0