зеркало из https://github.com/microsoft/clang-1.git
Implemented serialization of FunctionTypeNoProto.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43418 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
71ac846a4e
Коммит
e81e24c84b
|
@ -153,3 +153,22 @@ VectorType* VectorType::Materialize(llvm::Deserializer& D) {
|
|||
T->NumElements = D.ReadInt();
|
||||
return T;
|
||||
}
|
||||
|
||||
void FunctionType::EmitFunctionTypeInternal(llvm::Serializer &S) const {
|
||||
EmitTypeInternal(S);
|
||||
S.EmitBool(SubClassData);
|
||||
S.Emit(ResultType);
|
||||
}
|
||||
|
||||
void FunctionType::ReadFunctionTypeInternal(llvm::Deserializer& D) {
|
||||
ReadTypeInternal(D);
|
||||
SubClassData = D.ReadBool();
|
||||
D.Read(ResultType);
|
||||
}
|
||||
|
||||
|
||||
FunctionTypeNoProto* FunctionTypeNoProto::Materialize(llvm::Deserializer& D) {
|
||||
FunctionTypeNoProto* T = new FunctionTypeNoProto(QualType(),QualType());
|
||||
T->ReadFunctionTypeInternal(D);
|
||||
return T;
|
||||
}
|
||||
|
|
|
@ -711,6 +711,10 @@ public:
|
|||
T->getTypeClass() == FunctionProto;
|
||||
}
|
||||
static bool classof(const FunctionType *) { return true; }
|
||||
|
||||
protected:
|
||||
void EmitFunctionTypeInternal(llvm::Serializer& S) const;
|
||||
void ReadFunctionTypeInternal(llvm::Deserializer& D);
|
||||
};
|
||||
|
||||
/// FunctionTypeNoProto - Represents a K&R-style 'int foo()' function, which has
|
||||
|
@ -735,6 +739,9 @@ public:
|
|||
return T->getTypeClass() == FunctionNoProto;
|
||||
}
|
||||
static bool classof(const FunctionTypeNoProto *) { return true; }
|
||||
|
||||
void Emit(llvm::Serializer& S) const { EmitFunctionTypeInternal(S); }
|
||||
static FunctionTypeNoProto* Materialize(llvm::Deserializer& D);
|
||||
};
|
||||
|
||||
/// FunctionTypeProto - Represents a prototype with argument type info, e.g.
|
||||
|
|
Загрузка…
Ссылка в новой задаче