LLVM API Documentation
#include <JumpInstrTableInfo.h>
Public Types | |
typedef std::pair< Function *, Function * > | JumpPair |
typedef DenseMap< FunctionType *, std::vector< JumpPair > > | JumpTables |
Public Member Functions | |
JumpInstrTableInfo () | |
virtual | ~JumpInstrTableInfo () |
const char * | getPassName () const override |
void | insertEntry (FunctionType *TableFunTy, Function *Target, Function *Jump) |
Inserts an entry in a table, adding the table if it doesn't exist. | |
const JumpTables & | getTables () const |
Gets the tables. | |
Static Public Attributes | |
static char | ID |
This class stores information about jump-instruction tables created by the JumpInstrTables pass (in lib/CodeGen/JumpInstrTables.cpp). Each table is a map from a function type to a vector of pairs. The first element of each pair is the function that has the jumptable annotation. The second element is a function that was declared by JumpInstrTables and used to replace all address-taking sites for the original function.
The information in this pass is used in AsmPrinter (lib/CodeGen/AsmPrinter/AsmPrinter.cpp) to generate the required assembly for the jump-instruction tables.
Definition at line 36 of file JumpInstrTableInfo.h.
typedef std::pair<Function *, Function *> llvm::JumpInstrTableInfo::JumpPair |
Definition at line 46 of file JumpInstrTableInfo.h.
typedef DenseMap<FunctionType *, std::vector<JumpPair> > llvm::JumpInstrTableInfo::JumpTables |
Definition at line 47 of file JumpInstrTableInfo.h.
Definition at line 31 of file JumpInstrTableInfo.cpp.
References llvm::PassRegistry::getPassRegistry(), and llvm::initializeJumpInstrTableInfoPass().
JumpInstrTableInfo::~JumpInstrTableInfo | ( | ) | [virtual] |
Definition at line 35 of file JumpInstrTableInfo.cpp.
const char* llvm::JumpInstrTableInfo::getPassName | ( | ) | const [inline, override, virtual] |
getPassName - Return a nice clean name for a pass. This usually implemented in terms of the name that is registered by one of the Registration templates, but can be overloaded directly.
Reimplemented from llvm::Pass.
Definition at line 42 of file JumpInstrTableInfo.h.
const JumpTables& llvm::JumpInstrTableInfo::getTables | ( | ) | const [inline] |
Gets the tables.
Definition at line 53 of file JumpInstrTableInfo.h.
Referenced by llvm::AsmPrinter::doFinalization().
void JumpInstrTableInfo::insertEntry | ( | FunctionType * | TableFunTy, |
Function * | Target, | ||
Function * | Jump | ||
) |
Inserts an entry in a table, adding the table if it doesn't exist.
Definition at line 37 of file JumpInstrTableInfo.cpp.
Referenced by llvm::JumpInstrTables::insertEntry().
char llvm::JumpInstrTableInfo::ID [static] |
Definition at line 38 of file JumpInstrTableInfo.h.