aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AST/TypeSerialization.cpp14
-rw-r--r--include/clang/AST/Type.h3
2 files changed, 17 insertions, 0 deletions
diff --git a/AST/TypeSerialization.cpp b/AST/TypeSerialization.cpp
index 02b9f8803b..0ffdb99f83 100644
--- a/AST/TypeSerialization.cpp
+++ b/AST/TypeSerialization.cpp
@@ -139,3 +139,17 @@ ConstantArrayType* ConstantArrayType::Materialize(llvm::Deserializer& D) {
return T;
}
+
+void VectorType::Emit(llvm::Serializer& S) const {
+ EmitTypeInternal(S);
+ S.Emit(ElementType);
+ S.EmitInt(NumElements);
+}
+
+VectorType* VectorType::Materialize(llvm::Deserializer& D) {
+ VectorType* T = new VectorType(QualType(),0,QualType());
+ T->ReadTypeInternal(D);
+ D.Read(T->ElementType);
+ T->NumElements = D.ReadInt();
+ return T;
+}
diff --git a/include/clang/AST/Type.h b/include/clang/AST/Type.h
index b3832019ca..cc4d544f52 100644
--- a/include/clang/AST/Type.h
+++ b/include/clang/AST/Type.h
@@ -625,6 +625,9 @@ public:
return T->getTypeClass() == Vector || T->getTypeClass() == OCUVector;
}
static bool classof(const VectorType *) { return true; }
+
+ void Emit(llvm::Serializer& S) const;
+ static VectorType* Materialize(llvm::Deserializer& D);
};
/// OCUVectorType - Extended vector type. This type is created using