[pdb] Write the Named Stream mapping to Yaml and binary.

Differential Revision: https://reviews.llvm.org/D28919

llvm-svn: 292665
diff --git a/llvm/lib/DebugInfo/PDB/Raw/StringTableBuilder.cpp b/llvm/lib/DebugInfo/PDB/Raw/StringTableBuilder.cpp
index 7284582..5ae7447 100644
--- a/llvm/lib/DebugInfo/PDB/Raw/StringTableBuilder.cpp
+++ b/llvm/lib/DebugInfo/PDB/Raw/StringTableBuilder.cpp
@@ -38,16 +38,17 @@
   return (NumStrings + 1) * 1.25;
 }
 
-uint32_t StringTableBuilder::calculateSerializedLength() const {
+uint32_t StringTableBuilder::finalize() {
   uint32_t Size = 0;
   Size += sizeof(StringTableHeader);
   Size += StringSize;
-  Size += 4; // Hash table begins with 4-byte size field.
+  Size += sizeof(uint32_t); // Hash table begins with 4-byte size field.
 
   uint32_t BucketCount = computeBucketCount(Strings.size());
-  Size += BucketCount * 4;
+  Size += BucketCount * sizeof(uint32_t);
 
-  Size += 4; // The /names stream ends with the number of strings.
+  Size +=
+      sizeof(uint32_t); // The /names stream ends with the number of strings.
   return Size;
 }