[esan|cfrag] Add the struct field size array in StructInfo

Summary:
Adds the struct field size array in the struct StructInfo.

Prints struct field size info in the report.

Reviewers: aizatsky

Subscribers: vitalybuka, zhaoqin, kcc, eugenis, bruening, llvm-commits, kubabrecka

Differential Revision: http://reviews.llvm.org/D21342

llvm-svn: 272988
diff --git a/compiler-rt/lib/esan/cache_frag.cpp b/compiler-rt/lib/esan/cache_frag.cpp
index 32a8a4a..2096bec 100644
--- a/compiler-rt/lib/esan/cache_frag.cpp
+++ b/compiler-rt/lib/esan/cache_frag.cpp
@@ -29,6 +29,7 @@
   u32 Size;
   u32 NumFields;
   u32 *FieldOffsets;
+  u32 *FieldSize;
   u64 *FieldCounters;
   const char **FieldTypeNames;
 };
@@ -98,9 +99,9 @@
   Report("   size = %u, count = %llu, ratio = %llu\n", Struct->Size,
          Handle->Count, Handle->Ratio);
   for (u32 i = 0; i < Struct->NumFields; ++i) {
-    Report("   #%2u: offset = %u,\t count = %llu,\t type = %.*s\n", i,
-           Struct->FieldOffsets[i], Struct->FieldCounters[i],
-           TypePrintLimit, Struct->FieldTypeNames[i]);
+    Report("   #%2u: offset = %u,\t size = %u,\t count = %llu,\t type = %.*s\n",
+           i, Struct->FieldOffsets[i], Struct->FieldSize[i],
+           Struct->FieldCounters[i], TypePrintLimit, Struct->FieldTypeNames[i]);
   }
 }