[PDB] Save one type record copy
authorReid Kleckner <rnk@google.com>
Tue, 4 Apr 2017 00:56:34 +0000 (00:56 +0000)
committerReid Kleckner <rnk@google.com>
Tue, 4 Apr 2017 00:56:34 +0000 (00:56 +0000)
commit13fc411e390dcfbb65be20551ee78b6143d121a1
tree0f9f722aaf25085ab8d610734fa4d21d8eba973b
parentc4b5d794f1fe2ebb3a3c770d978d7cc7fe389b91
[PDB] Save one type record copy

Summary:
The TypeTableBuilder provides stable storage for type records. We don't
need to copy all of the bytes into a flat vector before adding it to the
TpiStreamBuilder.

This makes addTypeRecord take an ArrayRef<uint8_t> and a hash code to go
with it, which seems like a simplification.

Reviewers: ruiu, zturner, inglorion

Subscribers: llvm-commits

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

llvm-svn: 299406
lld/COFF/PDB.cpp
llvm/include/llvm/DebugInfo/PDB/Native/TpiStreamBuilder.h
llvm/lib/DebugInfo/PDB/Native/TpiStreamBuilder.cpp
llvm/tools/llvm-pdbdump/llvm-pdbdump.cpp