This is an archive of the discontinued LLVM Phabricator instance.

[pdb] Correctly parse hash adjusters table
ClosedPublic

Authored by zturner on Jan 24 2017, 10:43 AM.

Details

Summary

This is not a list of pairs, it is a hash table data structure. We now correctly parse this out. It's hard to write a test for this, because doing so would require we have a PDB with hash adjusters, and they are only generated in the case of collisions, which typically require a very large PDB.

I plan to do some follow-up analysis and see if I can manually create some types that will collide by examining the collisions of a large PDB and carefully choosing some types. If that is successful, I can construct a minimal PDB with collisions and add a test case for them. In the meantime, here is a sample of the output when run against a very large PDB that does have collisions.

Adjusters [
  {
    Type: llvm::SmallVectorStorage<llvm::cl::OptionEnumValue,4>
    TI: 0x4DBA
  }
  {
    Type: llvm::SmallVectorStorage<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,2>
    TI: 0x3C97
  }
  {
    Type: llvm::SmallVectorTemplateCommon<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,void>
    TI: 0x3D12
  }
  {
    Type: llvm::SmallVectorStorage<char,32>
    TI: 0x4305
  }
  {
    Type: llvm::ErrorOr<llvm::sys::fs::space_info>
    TI: 0x4302
  }
  {
    Type: llvm::SmallVectorStorage<char,260>
    TI: 0x30D0
  }
  {
    Type: llvm::SmallVectorStorage<void *,4>
    TI: 0x46FC
  }
  {
    Type: llvm::SmallVectorTemplateCommon<wchar_t,void>
    TI: 0x2E90
  }
  {
    Type: llvm::SmallVectorStorage<char,64>
    TI: 0x30A6
  }

Diff Detail

Repository
rL LLVM

Event Timeline

zturner created this revision.Jan 24 2017, 10:43 AM
inglorion accepted this revision.Jan 24 2017, 12:02 PM

lgtm. Let's get this in and revisit testing once we have a better understanding of what the adjusters are used for.

This revision is now accepted and ready to land.Jan 24 2017, 12:02 PM
ruiu accepted this revision.Jan 24 2017, 12:58 PM

LGTM

This revision was automatically updated to reflect the committed changes.