case Function:
cast<FunctionDecl>(this)->Emit(S);
break;
+
+ case Typedef:
+ cast<TypedefDecl>(this)->Emit(S);
+ break;
}
}
void VarDecl::InternalEmit(llvm::Serializer& S) const {
S.EmitInt(SClass);
S.EmitInt(objcDeclQualifier);
- VarDecl::InternalEmit(S);
+ ValueDecl::InternalEmit(S);
S.EmitOwnedPtr(Init);
}
return decl;
}
+
+void TypedefDecl::Emit(llvm::Serializer& S) const {
+ S.Emit(getLocation());
+ InternalEmit(S);
+ S.Emit(UnderlyingType);
+}
+
+TypedefDecl* TypedefDecl::Materialize(llvm::Deserializer& D) {
+ SourceLocation L = SourceLocation::ReadVal(D);
+ TypedefDecl* decl = new TypedefDecl(L,NULL,QualType(),NULL);
+ decl->InternalRead(D);
+ D.Read(decl->UnderlyingType);
+ return decl;
+}