LLVM API Documentation
00001 //===-- JumpInstrTableInfo.cpp: Info for Jump-Instruction Tables ----------===// 00002 // 00003 // This file is distributed under the University of Illinois Open Source 00004 // License. See LICENSE.TXT for details. 00005 // 00006 //===----------------------------------------------------------------------===// 00007 /// 00008 /// \file 00009 /// \brief Information about jump-instruction tables that have been created by 00010 /// JumpInstrTables pass. 00011 /// 00012 //===----------------------------------------------------------------------===// 00013 00014 #define DEBUG_TYPE "jiti" 00015 00016 #include "llvm/Analysis/JumpInstrTableInfo.h" 00017 #include "llvm/Analysis/Passes.h" 00018 #include "llvm/IR/Function.h" 00019 #include "llvm/IR/Type.h" 00020 00021 using namespace llvm; 00022 00023 INITIALIZE_PASS(JumpInstrTableInfo, "jump-instr-table-info", 00024 "Jump-Instruction Table Info", true, true) 00025 char JumpInstrTableInfo::ID = 0; 00026 00027 ImmutablePass *llvm::createJumpInstrTableInfoPass() { 00028 return new JumpInstrTableInfo(); 00029 } 00030 00031 JumpInstrTableInfo::JumpInstrTableInfo() : ImmutablePass(ID), Tables() { 00032 initializeJumpInstrTableInfoPass(*PassRegistry::getPassRegistry()); 00033 } 00034 00035 JumpInstrTableInfo::~JumpInstrTableInfo() {} 00036 00037 void JumpInstrTableInfo::insertEntry(FunctionType *TableFunTy, Function *Target, 00038 Function *Jump) { 00039 Tables[TableFunTy].push_back(JumpPair(Target, Jump)); 00040 }