diff options
author | Ted Kremenek <kremenek@apple.com> | 2007-10-27 19:05:09 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2007-10-27 19:05:09 +0000 |
commit | 71ac846a4e20ad378700df040abeb3eb06163bca (patch) | |
tree | 1367d2df85f2856255708da20952f7ad4835f9e9 | |
parent | a4cb4525cf4bf8f61299147f22ffc187ed1eac9e (diff) |
Implemented serialization for VectorType.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43417 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | AST/TypeSerialization.cpp | 14 | ||||
-rw-r--r-- | include/clang/AST/Type.h | 3 |
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 |