[cfe-commits] r43407 - /cfe/trunk/AST/TypeSerialization.cpp

Ted Kremenek kremenek at apple.com
Fri Oct 26 15:00:08 PDT 2007


Author: kremenek
Date: Fri Oct 26 17:00:08 2007
New Revision: 43407

URL: http://llvm.org/viewvc/llvm-project?rev=43407&view=rev
Log:
Completed serialization of ConstantArrayTypes (now that APInt serialization is in place).

Modified:
    cfe/trunk/AST/TypeSerialization.cpp

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

==============================================================================
--- cfe/trunk/AST/TypeSerialization.cpp (original)
+++ cfe/trunk/AST/TypeSerialization.cpp Fri Oct 26 17:00:08 2007
@@ -101,27 +101,19 @@
 }
 
 void ConstantArrayType::Emit(llvm::Serializer& S) const {
-#if 0
-  // FIXME: APInt serialization
-  S.Emit(Size);
-#endif
   EmitArrayTypeInternal(S);
+  S.Emit(Size);
 }
 
 ConstantArrayType* ConstantArrayType::Materialize(llvm::Deserializer& D) {
-#if 0
-  llvm::APInt x = S.ReadVal<llvm::APInt>(D);
-  
   // "Default" construct the array.
   ConstantArrayType* T =
-    new ConstantArrayType(QualType(), QualType(), x, ArrayType::Normal, 0);
+    new ConstantArrayType(QualType(), QualType(), llvm::APInt(), 
+                          ArrayType::Normal, 0);
   
   // Deserialize the internal values.
-  T->ReadArrayTypeInternal(D);
+  T->ReadArrayTypeInternal(D);  
+  D.Read(T->Size);
 
   return T;
-#else
-  return NULL;
-#endif
-
 }





More information about the cfe-commits mailing list