LLVM API Documentation

Public Member Functions | Friends
llvm::ValueSymbolTable Class Reference

#include <ValueSymbolTable.h>

List of all members.

Public Types

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

Public Member Functions

 ValueSymbolTable ()
 ~ValueSymbolTable ()
Valuelookup (StringRef Name) const
 Lookup a named Value.
bool empty () const
 Determine if the symbol table is empty.
unsigned size () const
 The number of name/type pairs is returned.
void dump () const
 Print out symbol table on stderr.
iterator begin ()
 Get an iterator that from the beginning of the symbol table.
const_iterator begin () const
 Get a const_iterator that from the beginning of the symbol table.
iterator end ()
 Get an iterator to the end of the symbol table.
const_iterator end () const
 Get a const_iterator to the end of the symbol table.

Friends

class Value
class SymbolTableListTraits< Argument, Function >
class SymbolTableListTraits< BasicBlock, Function >
class SymbolTableListTraits< Instruction, BasicBlock >
class SymbolTableListTraits< Function, Module >
class SymbolTableListTraits< GlobalVariable, Module >
class SymbolTableListTraits< GlobalAlias, Module >

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 52 of file ValueSymbolTable.h.

An iterator over a ValueMap.

Definition at line 49 of file ValueSymbolTable.h.

A mapping of names to values.

Definition at line 46 of file ValueSymbolTable.h.


Constructor & Destructor Documentation

Definition at line 57 of file ValueSymbolTable.h.


Member Function Documentation

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

Definition at line 84 of file ValueSymbolTable.h.

Referenced by dump(), StripSymtab(), and WriteValueSymbolTable().

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

Definition at line 87 of file ValueSymbolTable.h.

void ValueSymbolTable::dump ( ) const

Print out symbol table on stderr.

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

Definition at line 108 of file ValueSymbolTable.cpp.

References begin(), end(), and 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 71 of file ValueSymbolTable.h.

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

Referenced by WriteValueSymbolTable().

Get an iterator to the end of the symbol table.

Definition at line 90 of file ValueSymbolTable.h.

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

Referenced by dump(), StripSymtab(), and WriteValueSymbolTable().

Get a const_iterator to the end of the symbol table.

Definition at line 93 of file ValueSymbolTable.h.

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

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

Lookup a named Value.

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

Returns:
the value associated with the Name

Definition at line 67 of file ValueSymbolTable.h.

Referenced by llvm::Module::getNamedValue().

The number of name/type pairs is returned.

Definition at line 74 of file ValueSymbolTable.h.

References llvm::StringMapImpl::empty().


Friends And Related Function Documentation

friend class SymbolTableListTraits< Argument, Function > [friend]

Definition at line 36 of file ValueSymbolTable.h.

friend class SymbolTableListTraits< BasicBlock, Function > [friend]

Definition at line 37 of file ValueSymbolTable.h.

friend class SymbolTableListTraits< Function, Module > [friend]

Definition at line 39 of file ValueSymbolTable.h.

friend class SymbolTableListTraits< GlobalAlias, Module > [friend]

Definition at line 41 of file ValueSymbolTable.h.

friend class SymbolTableListTraits< GlobalVariable, Module > [friend]

Definition at line 40 of file ValueSymbolTable.h.

friend class SymbolTableListTraits< Instruction, BasicBlock > [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: