[cfe-commits] r43417 - in /cfe/trunk: AST/TypeSerialization.cpp include/clang/AST/Type.h

Ted Kremenek kremenek at apple.com
Sat Oct 27 12:05:13 PDT 2007


Author: kremenek
Date: Sat Oct 27 14:05:09 2007
New Revision: 43417

URL: http://llvm.org/viewvc/llvm-project?rev=43417&view=rev
Log:
Implemented serialization for VectorType.

Modified:
    cfe/trunk/AST/TypeSerialization.cpp
    cfe/trunk/include/clang/AST/Type.h

Modified: cfe/trunk/AST/TypeSerialization.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/AST/TypeSerialization.cpp?rev=43417&r1=43416&r2=43417&view=diff

==============================================================================
--- cfe/trunk/AST/TypeSerialization.cpp (original)
+++ cfe/trunk/AST/TypeSerialization.cpp Sat Oct 27 14:05:09 2007
@@ -139,3 +139,17 @@
 
   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;
+}

Modified: cfe/trunk/include/clang/AST/Type.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Type.h?rev=43417&r1=43416&r2=43417&view=diff

==============================================================================
--- cfe/trunk/include/clang/AST/Type.h (original)
+++ cfe/trunk/include/clang/AST/Type.h Sat Oct 27 14:05:09 2007
@@ -625,6 +625,9 @@
     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





More information about the cfe-commits mailing list