add accessors.

llvm-svn: 67929
This commit is contained in:
Chris Lattner 2009-03-28 07:00:38 +00:00
parent 6b6185b18f
commit a3d4aeb113
1 changed files with 7 additions and 1 deletions

View 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;