OSDN Git Service

[PDB] Finish and simplify TPI hashing
authorReid Kleckner <rnk@google.com>
Tue, 18 Jul 2017 00:33:45 +0000 (00:33 +0000)
committerReid Kleckner <rnk@google.com>
Tue, 18 Jul 2017 00:33:45 +0000 (00:33 +0000)
commit3361fafaf76d3ca6af98e3f633ae4d33b1a918da
treeee1d1ccb51484939fc8017de7173c47d196d67d3
parentb672df825ad9d6b4b16ddadb73c9b012c04ded05
[PDB] Finish and simplify TPI hashing

Summary:
This removes the CVTypeVisitor updater and verifier classes. They were
made dead by the minimal type dumping refactoring. Replace them with a
single function that takes a type record and produces a hash. Call this
from the minimal type dumper and compare the hash.

I also noticed that the microsoft-pdb reference repository uses a basic
CRC32 for records that aren't special. We already have an implementation
of that CRC ready to use, because it's used in COFF for ICF.

I'll make LLD call this hashing utility in a follow-up change. We might
also consider using this same hash in type stream merging, so that we
don't have to hash our records twice.

Reviewers: inglorion, ruiu

Subscribers: llvm-commits, hiraditya

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308240 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/DebugInfo/PDB/Native/TpiHashing.h
lib/DebugInfo/PDB/Native/TpiHashing.cpp
test/DebugInfo/PDB/pdbdump-headers.test
tools/llvm-pdbutil/DumpOutputStyle.cpp
tools/llvm-pdbutil/MinimalTypeDumper.cpp
tools/llvm-pdbutil/MinimalTypeDumper.h