top | up | prev | next

SwitchInstruction Class

Definition at line 346 of Instruction.hpp

Constructors

SwitchInstruction(Value* cond_, BasicBlock* defaultDest_)

Member Functions

void AddCase(Value* caseValue, BasicBlock* dest)
void Write(CodeFormatter& formatter, Function& function, Context& context)

Member Variables

Value* cond
BasicBlock* defaultDest
std::vector<std::pair<Value*, BasicBlock*>> destinations

Constructor Details

SwitchInstruction Constructor

cmsxi::SwitchInstruction::SwitchInstruction(Value * cond_, BasicBlock * defaultDest_)

Definition at line 614 of Instruction.cpp :
614 : Instruction()cond(cond_)defaultDest(defaultDest_)destinations()
615 {
616 }


Declaration at line 349 of Instruction.hpp


Member Function Details

AddCase Member Function

void cmsxi::SwitchInstruction::AddCase(Value * caseValue, BasicBlock * dest)

Definition at line 618 of Instruction.cpp :
619 {
620     destinations.push_back(std::make_pair(caseValuedest));
621 }


Declaration at line 350 of Instruction.hpp


Write Member Function

void cmsxi::SwitchInstruction::Write(CodeFormatter& formatter, Function & function, Context & context)

Definition at line 623 of Instruction.cpp

Calls: cmsxi::BasicBlock::Id , cmsxi::Instruction::WriteMetadataRef , cmsxi::Type::Name , cmsxi::Value::GetType , cmsxi::Value::Name


top | up | prev | next