LLVM  6.0.0svn
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:
Collaboration graph
[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() [1/2]

HashTable::HashTable ( )

Definition at line 25 of file HashTable.cpp.

◆ HashTable() [2/2]

HashTable::HashTable ( uint32_t  Capacity)
explicit

Definition at line 27 of file HashTable.cpp.

References Buckets.

Member Function Documentation

◆ begin()

HashTableIterator HashTable::begin ( ) const

Definition at line 116 of file HashTable.cpp.

References HashTableIterator.

◆ calculateSerializedLength()

uint32_t HashTable::calculateSerializedLength ( ) const

◆ capacity()

uint32_t HashTable::capacity ( ) const

Definition at line 112 of file HashTable.cpp.

References Buckets.

Referenced by commit(), and find().

◆ clear()

void HashTable::clear ( )

◆ commit()

Error HashTable::commit ( BinaryStreamWriter Writer) const

◆ end()

HashTableIterator HashTable::end ( ) const

Definition at line 118 of file HashTable.cpp.

References HashTableIterator.

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

◆ find()

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().

◆ get()

uint32_t HashTable::get ( uint32_t  K)

Definition at line 186 of file HashTable.cpp.

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

◆ isDeleted()

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().

◆ isPresent()

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().

◆ load()

Error HashTable::load ( BinaryStreamReader Stream)

◆ remove()

void HashTable::remove ( uint32_t  K)

◆ set()

void HashTable::set ( uint32_t  K,
uint32_t  V 
)

◆ size()

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

◆ HashTableIterator

friend class HashTableIterator
friend

Definition at line 32 of file HashTable.h.

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

Member Data Documentation

◆ Buckets

BucketList llvm::pdb::HashTable::Buckets
protected

◆ Deleted

SparseBitVector llvm::pdb::HashTable::Deleted
mutableprotected

Definition at line 69 of file HashTable.h.

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

◆ Present

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

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