forked from OSchip/llvm-project
add castToDeclContext/castFromDeclContext methods to RecordDecl.
llvm-svn: 62026
This commit is contained in:
parent
c56c37f039
commit
1857139755
|
@ -1146,7 +1146,12 @@ public:
|
|||
return D->getKind() >= RecordFirst && D->getKind() <= RecordLast;
|
||||
}
|
||||
static bool classof(const RecordDecl *D) { return true; }
|
||||
|
||||
static DeclContext *castToDeclContext(const RecordDecl *D) {
|
||||
return static_cast<DeclContext *>(const_cast<RecordDecl*>(D));
|
||||
}
|
||||
static RecordDecl *castFromDeclContext(const DeclContext *DC) {
|
||||
return static_cast<RecordDecl *>(const_cast<DeclContext*>(DC));
|
||||
}
|
||||
protected:
|
||||
/// EmitImpl - Serialize this RecordDecl. Called by Decl::Emit.
|
||||
virtual void EmitImpl(llvm::Serializer& S) const;
|
||||
|
|
Loading…
Reference in New Issue