LLVM  4.0.0
Friends | List of all members
llvm::ValueSymbolTable Class Reference

This class provides a symbol table of name/value pairs. More...

#include <ValueSymbolTable.h>

Public Types

Types
typedef StringMap< Value * > ValueMap
 A mapping of names to values. More...
 
typedef ValueMap::iterator iterator
 An iterator over a ValueMap. More...
 
typedef ValueMap::const_iterator const_iterator
 A const_iterator over a ValueMap. More...
 

Public Member Functions

Constructors
 ValueSymbolTable ()
 
 ~ValueSymbolTable ()
 
Accessors
Valuelookup (StringRef Name) const
 This method finds the value with the given Name in the the symbol table. More...
 
bool empty () const
 Determine if the symbol table is empty. More...
 
unsigned size () const
 The number of name/type pairs is returned. More...
 
void dump () const
 This function can be used from the debugger to display the content of the symbol table while debugging. More...
 
Iteration
iterator begin ()
 Get an iterator that from the beginning of the symbol table. More...
 
const_iterator begin () const
 Get a const_iterator that from the beginning of the symbol table. More...
 
iterator end ()
 Get an iterator to the end of the symbol table. More...
 
const_iterator end () const
 Get a const_iterator to the end of the symbol table. More...
 

Friends

class Value
 
class SymbolTableListTraits< Argument >
 
class SymbolTableListTraits< BasicBlock >
 
class SymbolTableListTraits< Instruction >
 
class SymbolTableListTraits< Function >
 
class SymbolTableListTraits< GlobalVariable >
 
class SymbolTableListTraits< GlobalAlias >
 
class SymbolTableListTraits< GlobalIFunc >
 

Detailed Description

This class provides a symbol table of name/value pairs.

It is essentially a std::map<std::string,Value*> but has a controlled interface provided by LLVM as well as ensuring uniqueness of names.

Definition at line 34 of file ValueSymbolTable.h.

Member Typedef Documentation

A const_iterator over a ValueMap.

Definition at line 53 of file ValueSymbolTable.h.

An iterator over a ValueMap.

Definition at line 50 of file ValueSymbolTable.h.

A mapping of names to values.

Definition at line 47 of file ValueSymbolTable.h.

Constructor & Destructor Documentation

llvm::ValueSymbolTable::ValueSymbolTable ( )
inline

Definition at line 59 of file ValueSymbolTable.h.

ValueSymbolTable::~ValueSymbolTable ( )

Definition at line 30 of file ValueSymbolTable.cpp.

References assert(), llvm::dbgs(), and VI.

Member Function Documentation

iterator llvm::ValueSymbolTable::begin ( )
inline

Get an iterator that from the beginning of the symbol table.

Definition at line 89 of file ValueSymbolTable.h.

References llvm::StringMap< ValueTy, AllocatorTy >::begin().

Referenced by StripSymtab().

const_iterator llvm::ValueSymbolTable::begin ( ) const
inline

Get a const_iterator that from the beginning of the symbol table.

Definition at line 92 of file ValueSymbolTable.h.

References llvm::StringMap< ValueTy, AllocatorTy >::begin().

LLVM_DUMP_METHOD void ValueSymbolTable::dump ( ) const

This function can be used from the debugger to display the content of the symbol table while debugging.

Print out symbol table on stderr

Definition at line 104 of file ValueSymbolTable.cpp.

References I.

bool llvm::ValueSymbolTable::empty ( ) const
inline

Determine if the symbol table is empty.

Returns
true iff the symbol table is empty

Definition at line 74 of file ValueSymbolTable.h.

References llvm::StringMapImpl::empty().

iterator llvm::ValueSymbolTable::end ( )
inline

Get an iterator to the end of the symbol table.

Definition at line 95 of file ValueSymbolTable.h.

References llvm::StringMap< ValueTy, AllocatorTy >::end().

Referenced by StripSymtab().

const_iterator llvm::ValueSymbolTable::end ( ) const
inline

Get a const_iterator to the end of the symbol table.

Definition at line 98 of file ValueSymbolTable.h.

References llvm::StringMap< ValueTy, AllocatorTy >::end().

Value* llvm::ValueSymbolTable::lookup ( StringRef  Name) const
inline

This method finds the value with the given Name in the the symbol table.

Returns
the value associated with the Name Lookup a named Value.

Definition at line 70 of file ValueSymbolTable.h.

References llvm::StringMap< ValueTy, AllocatorTy >::lookup().

Referenced by llvm::Module::getNamedValue(), and llvm::MIRParserImpl::initializeFrameInfo().

unsigned llvm::ValueSymbolTable::size ( ) const
inline

The number of name/type pairs is returned.

Definition at line 77 of file ValueSymbolTable.h.

References llvm::StringMapImpl::size().

Friends And Related Function Documentation

friend class SymbolTableListTraits< Argument >
friend

Definition at line 36 of file ValueSymbolTable.h.

friend class SymbolTableListTraits< BasicBlock >
friend

Definition at line 37 of file ValueSymbolTable.h.

friend class SymbolTableListTraits< Function >
friend

Definition at line 39 of file ValueSymbolTable.h.

friend class SymbolTableListTraits< GlobalAlias >
friend

Definition at line 41 of file ValueSymbolTable.h.

friend class SymbolTableListTraits< GlobalIFunc >
friend

Definition at line 42 of file ValueSymbolTable.h.

friend class SymbolTableListTraits< GlobalVariable >
friend

Definition at line 40 of file ValueSymbolTable.h.

friend class SymbolTableListTraits< Instruction >
friend

Definition at line 38 of file ValueSymbolTable.h.

friend class Value
friend

Definition at line 35 of file ValueSymbolTable.h.


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