We need to output the number of records we have, so we know how many to read in!  Doh.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9555 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/runtime/libprofile/CommonProfiling.c b/runtime/libprofile/CommonProfiling.c
index ea795b6..e5cfbe3 100644
--- a/runtime/libprofile/CommonProfiling.c
+++ b/runtime/libprofile/CommonProfiling.c
@@ -78,5 +78,6 @@
   /* Write out this record! */
   PTy = PT;
   write(OutFile, &PTy, sizeof(int));
+  write(OutFile, &NumElements, sizeof(unsigned));
   write(OutFile, Start, NumElements*sizeof(unsigned));
 }