[codeview] Properly propagate the TypeLeafKind through the pipeline.

llvm-svn: 280388
diff --git a/llvm/lib/DebugInfo/PDB/Raw/TpiStream.cpp b/llvm/lib/DebugInfo/PDB/Raw/TpiStream.cpp
index 7154b29..6214e63 100644
--- a/llvm/lib/DebugInfo/PDB/Raw/TpiStream.cpp
+++ b/llvm/lib/DebugInfo/PDB/Raw/TpiStream.cpp
@@ -124,13 +124,13 @@
   Expected<TypeLeafKind>
   visitTypeBegin(const CVRecord<TypeLeafKind> &Rec) override {
     ++Index;
-    RawRecord = &Rec;
+    RawRecord = Rec;
     return Rec.Type;
   }
 
 private:
   template <typename T> Error verify(T &Rec) {
-    uint32_t Hash = getTpiHash(Rec, *RawRecord);
+    uint32_t Hash = getTpiHash(Rec, RawRecord);
     if (Hash % NumHashBuckets != HashValues[Index])
       return errorInvalidHash();
     return Error::success();
@@ -152,7 +152,7 @@
   }
 
   FixedStreamArray<support::ulittle32_t> HashValues;
-  const CVRecord<TypeLeafKind> *RawRecord;
+  CVRecord<TypeLeafKind> RawRecord;
   uint32_t NumHashBuckets;
   uint32_t Index = -1;
 };