class LLParser::PerFunctionState

Declaration

class LLParser::PerFunctionState { /* full declaration omitted */ };

Declared at: llvm/include/llvm/AsmParser/LLParser.h:417

Member Variables

private llvm::LLParser& P
private llvm::Function& F
private std::map<std::string, std::pair<Value*, LocTy>> ForwardRefVals
private std::map<unsigned int, std::pair<Value*, LocTy>> ForwardRefValIDs
private std::vector<Value*> NumberedVals
private int FunctionNumber
FunctionNumber - If this is an unnamed function, this is the slot number of it, otherwise it is -1.

Method Overview

  • public PerFunctionState(llvm::LLParser & p, llvm::Function & f, int functionNumber)
  • public llvm::BasicBlock * defineBB(const std::string & Name, int NameID, llvm::LLParser::LocTy Loc)
  • public bool finishFunction()
  • public llvm::BasicBlock * getBB(const std::string & Name, llvm::LLParser::LocTy Loc)
  • public llvm::BasicBlock * getBB(unsigned int ID, llvm::LLParser::LocTy Loc)
  • public llvm::Function & getFunction() const
  • public llvm::Value * getVal(const std::string & Name, llvm::Type * Ty, llvm::LLParser::LocTy Loc)
  • public llvm::Value * getVal(unsigned int ID, llvm::Type * Ty, llvm::LLParser::LocTy Loc)
  • public bool resolveForwardRefBlockAddresses()
  • public bool setInstName(int NameID, const std::string & NameStr, llvm::LLParser::LocTy NameLoc, llvm::Instruction * Inst)
  • public ~PerFunctionState()

Methods

PerFunctionState(llvm::LLParser& p,
                 llvm::Function& f,
                 int functionNumber)

Declared at: llvm/include/llvm/AsmParser/LLParser.h:428

Parameters

llvm::LLParser& p
llvm::Function& f
int functionNumber

llvm::BasicBlock* defineBB(
    const std::string& Name,
    int NameID,
    llvm::LLParser::LocTy Loc)

Description

DefineBB - Define the specified basic block, which is either named or unnamed. If there is an error, this returns null otherwise it returns the block being defined.

Declared at: llvm/include/llvm/AsmParser/LLParser.h:455

Parameters

const std::string& Name
int NameID
llvm::LLParser::LocTy Loc

bool finishFunction()

Declared at: llvm/include/llvm/AsmParser/LLParser.h:433

llvm::BasicBlock* getBB(const std::string& Name,
                        llvm::LLParser::LocTy Loc)

Description

GetBB - Get a basic block with the specified name or ID, creating a forward reference record if needed. This can return null if the value is not a BasicBlock.

Declared at: llvm/include/llvm/AsmParser/LLParser.h:449

Parameters

const std::string& Name
llvm::LLParser::LocTy Loc

llvm::BasicBlock* getBB(unsigned int ID,
                        llvm::LLParser::LocTy Loc)

Declared at: llvm/include/llvm/AsmParser/LLParser.h:450

Parameters

unsigned int ID
llvm::LLParser::LocTy Loc

llvm::Function& getFunction() const

Declared at: llvm/include/llvm/AsmParser/LLParser.h:431

llvm::Value* getVal(const std::string& Name,
                    llvm::Type* Ty,
                    llvm::LLParser::LocTy Loc)

Description

GetVal - Get a value with the specified name or ID, creating a forward reference record if needed. This can return null if the value exists but does not have the right type.

Declared at: llvm/include/llvm/AsmParser/LLParser.h:438

Parameters

const std::string& Name
llvm::Type* Ty
llvm::LLParser::LocTy Loc

llvm::Value* getVal(unsigned int ID,
                    llvm::Type* Ty,
                    llvm::LLParser::LocTy Loc)

Declared at: llvm/include/llvm/AsmParser/LLParser.h:439

Parameters

unsigned int ID
llvm::Type* Ty
llvm::LLParser::LocTy Loc

bool resolveForwardRefBlockAddresses()

Declared at: llvm/include/llvm/AsmParser/LLParser.h:457

bool setInstName(int NameID,
                 const std::string& NameStr,
                 llvm::LLParser::LocTy NameLoc,
                 llvm::Instruction* Inst)

Description

setInstName - After an instruction is parsed and inserted into its basic block, this installs its name.

Declared at: llvm/include/llvm/AsmParser/LLParser.h:443

Parameters

int NameID
const std::string& NameStr
llvm::LLParser::LocTy NameLoc
llvm::Instruction* Inst

~PerFunctionState()

Declared at: llvm/include/llvm/AsmParser/LLParser.h:429