forked from OSchip/llvm-project
Added missing break statement.
Reordered serialization methods for FunctionTypeProto and FunctionTypeNoProto to be alphabetical by serialized type name. llvm-svn: 44130
This commit is contained in:
parent
dde78986fb
commit
ec56081f38
|
@ -72,6 +72,7 @@ void Type::Create(ASTContext& Context, unsigned i, Deserializer& D) {
|
|||
|
||||
case Type::ConstantArray:
|
||||
D.RegisterPtr(PtrID,ConstantArrayType::CreateImpl(Context,D));
|
||||
break;
|
||||
|
||||
case Type::FunctionNoProto:
|
||||
D.RegisterPtr(PtrID,FunctionTypeNoProto::CreateImpl(Context,D));
|
||||
|
@ -137,6 +138,18 @@ Type* ConstantArrayType::CreateImpl(ASTContext& Context, Deserializer& D) {
|
|||
// FunctionTypeNoProto
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
void FunctionTypeNoProto::EmitImpl(Serializer& S) const {
|
||||
S.Emit(getResultType());
|
||||
}
|
||||
|
||||
Type* FunctionTypeNoProto::CreateImpl(ASTContext& Context, Deserializer& D) {
|
||||
return Context.getFunctionTypeNoProto(QualType::ReadVal(D)).getTypePtr();
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// FunctionTypeProto
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
void FunctionTypeProto::EmitImpl(Serializer& S) const {
|
||||
S.Emit(getResultType());
|
||||
S.EmitBool(isVariadic());
|
||||
|
@ -160,18 +173,6 @@ Type* FunctionTypeProto::CreateImpl(ASTContext& Context, Deserializer& D) {
|
|||
NumArgs,isVariadic).getTypePtr();
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// FunctionTypeProto
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
void FunctionTypeNoProto::EmitImpl(Serializer& S) const {
|
||||
S.Emit(getResultType());
|
||||
}
|
||||
|
||||
Type* FunctionTypeNoProto::CreateImpl(ASTContext& Context, Deserializer& D) {
|
||||
return Context.getFunctionTypeNoProto(QualType::ReadVal(D)).getTypePtr();
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// PointerType
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
|
Loading…
Reference in New Issue