[cfe-commits] r67929 - /cfe/trunk/include/clang/AST/DeclGroup.h

Chris Lattner sabre at nondot.org
Sat Mar 28 00:00:39 PDT 2009


Author: lattner
Date: Sat Mar 28 02:00:38 2009
New Revision: 67929

URL: http://llvm.org/viewvc/llvm-project?rev=67929&view=rev
Log:
add accessors.

Modified:
    cfe/trunk/include/clang/AST/DeclGroup.h

Modified: cfe/trunk/include/clang/AST/DeclGroup.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclGroup.h?rev=67929&r1=67928&r2=67929&view=diff

==============================================================================
--- cfe/trunk/include/clang/AST/DeclGroup.h (original)
+++ cfe/trunk/include/clang/AST/DeclGroup.h Sat Mar 28 02:00:38 2009
@@ -93,7 +93,6 @@
     return const_cast<DeclGroupRef*>(this)->getDeclGroup();
   }
   
-
   iterator begin() {
     if (isSingleDecl())
       return D ? &D : 0;
@@ -120,6 +119,13 @@
     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;
   





More information about the cfe-commits mailing list