]> granicus.if.org Git - clang/commitdiff
add accessors.
authorChris Lattner <sabre@nondot.org>
Sat, 28 Mar 2009 07:00:38 +0000 (07:00 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 28 Mar 2009 07:00:38 +0000 (07:00 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67929 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/DeclGroup.h

index c9d0d655cb29f594fd202e9a78f01a259a353131..3a57281bc02274f251d417a5426161690a12b3bb 100644 (file)
@@ -93,7 +93,6 @@ public:
     return const_cast<DeclGroupRef*>(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<Decl*>(Ptr);
+    return X;
+  }
+  
   /// Emit - Serialize a DeclGroupRef to Bitcode.
   void Emit(llvm::Serializer& S) const;