[PATCH] D28715: Raise the PDB Hash Map out of the NameMap class

Zachary Turner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 13 17:06:26 PST 2017


zturner created this revision.
zturner added reviewers: inglorion, amccarth, ruiu.
zturner added a subscriber: llvm-commits.
Herald added a subscriber: mgorny.

  [pdb] Raise out the hash table used in NameMap to its own class.
  
  This data structure is used in other places in the PDB code,
  one of which we have immediate need for in the TPI stream.  The
  data structure is the exact same as that used by the NameMap.
  It is not really so much of a hash table as it is a linear
  dictionary where items can be deleted and then later re-used.
  
  In raising this out, I found some bugs in the original
  implementation, particularly regarding the deleted and present
  bit vectors whose values were improperly being ignored upon
  serialization.
  
  In the Microsoft implementation, this is a template class where
  key and value can be arbitrary types.  However, in all uses
  which seem important to serialize, the key and value are
  32-bit integers, so to simplify things I've called this class
  LinearIntegerMap.  We can re-generalize later if we find it
  necessary to do so.


https://reviews.llvm.org/D28715

Files:
  llvm/include/llvm/DebugInfo/PDB/Raw/LinearIntegerMap.h
  llvm/include/llvm/DebugInfo/PDB/Raw/NameMapBuilder.h
  llvm/lib/DebugInfo/PDB/CMakeLists.txt
  llvm/lib/DebugInfo/PDB/Raw/LinearIntegerMap.cpp
  llvm/lib/DebugInfo/PDB/Raw/NameMap.cpp
  llvm/lib/DebugInfo/PDB/Raw/NameMapBuilder.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28715.84409.patch
Type: text/x-patch
Size: 24350 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170114/a4f46f36/attachment.bin>


More information about the llvm-commits mailing list