LLVM  5.0.0
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
llvm::pdb::HashTable Class Reference

#include "llvm/DebugInfo/PDB/Native/HashTable.h"

Collaboration diagram for llvm::pdb::HashTable:
[legend]

Public Member Functions

 HashTable ()
 
 HashTable (uint32_t Capacity)
 
Error load (BinaryStreamReader &Stream)
 
uint32_t calculateSerializedLength () const
 
Error commit (BinaryStreamWriter &Writer) const
 
void clear ()
 
uint32_t capacity () const
 
uint32_t size () const
 
HashTableIterator begin () const
 
HashTableIterator end () const
 
HashTableIterator find (uint32_t K)
 
void set (uint32_t K, uint32_t V)
 
void remove (uint32_t K)
 
uint32_t get (uint32_t K)
 

Protected Member Functions

bool isPresent (uint32_t K) const
 
bool isDeleted (uint32_t K) const
 

Protected Attributes

BucketList Buckets
 
SparseBitVector Present
 
SparseBitVector Deleted
 

Friends

class HashTableIterator
 

Detailed Description

Definition at line 31 of file HashTable.h.

Constructor & Destructor Documentation

HashTable::HashTable ( )

Definition at line 25 of file HashTable.cpp.

HashTable::HashTable ( uint32_t  Capacity)
explicit

Definition at line 27 of file HashTable.cpp.

References Buckets.

Member Function Documentation

HashTableIterator HashTable::begin ( ) const

Definition at line 116 of file HashTable.cpp.

References HashTableIterator.

uint32_t HashTable::calculateSerializedLength ( ) const
uint32_t HashTable::capacity ( ) const

Definition at line 112 of file HashTable.cpp.

References Buckets.

Referenced by commit(), and find().

void HashTable::clear ( )
Error HashTable::commit ( BinaryStreamWriter &  Writer) const
HashTableIterator HashTable::end ( ) const

Definition at line 118 of file HashTable.cpp.

References HashTableIterator.

Referenced by get(), remove(), and set().

HashTableIterator HashTable::find ( uint32_t  K)

Definition at line 122 of file HashTable.cpp.

References assert(), Buckets, capacity(), first, H, HashTableIterator, I, isDeleted(), and isPresent().

Referenced by get(), remove(), and set().

uint32_t HashTable::get ( uint32_t  K)

Definition at line 186 of file HashTable.cpp.

References assert(), end(), find(), and I.

bool llvm::pdb::HashTable::isDeleted ( uint32_t  K) const
inlineprotected

Definition at line 65 of file HashTable.h.

References Deleted, and llvm::SparseBitVector< ElementSize >::test().

Referenced by find().

bool llvm::pdb::HashTable::isPresent ( uint32_t  K) const
inlineprotected

Definition at line 64 of file HashTable.h.

References Present, and llvm::SparseBitVector< ElementSize >::test().

Referenced by find(), and set().

Error HashTable::load ( BinaryStreamReader &  Stream)
void HashTable::remove ( uint32_t  K)
void HashTable::set ( uint32_t  K,
uint32_t  V 
)
uint32_t HashTable::size ( ) const

Definition at line 114 of file HashTable.cpp.

References llvm::SparseBitVector< ElementSize >::count(), and Present.

Referenced by calculateSerializedLength(), and commit().

Friends And Related Function Documentation

friend class HashTableIterator
friend

Definition at line 32 of file HashTable.h.

Referenced by begin(), end(), and find().

Member Data Documentation

BucketList llvm::pdb::HashTable::Buckets
protected
SparseBitVector llvm::pdb::HashTable::Deleted
mutableprotected

Definition at line 69 of file HashTable.h.

Referenced by calculateSerializedLength(), clear(), commit(), isDeleted(), load(), remove(), and set().

SparseBitVector llvm::pdb::HashTable::Present
mutableprotected

The documentation for this class was generated from the following files: