Abstract base class that rewrites MCInsts for LFI sandboxing.

Synopsis

Declared in <llvm/MC/MCLFIRewriter.h>

class MCLFIRewriter;

Member Functions

Name

Description

MCLFIRewriter [constructor]

Construct a rewriter with the given context and target desc tables.

~MCLFIRewriter [destructor] [virtual]

Destroy the LFI rewriter.

disable

Disable LFI rewriting.

enable

Enable LFI rewriting.

error

Report an error at the location of Inst.

explicitlyModifiesRegister

Return true if Inst explicitly modifies Reg.

finish [virtual]

Flush pending rewriter state when the stream is finalized.

isBranch

Return true if Inst is a branch.

isCall

Return true if Inst is a call.

isIndirectBranch

Return true if Inst is an indirect branch.

isReturn

Return true if Inst is a return.

mayLoad

Return true if Inst may load from memory.

mayModifyRegister

Return true if Inst may modify Reg, including implicitly.

mayStore

Return true if Inst may store to memory.

onLabel [virtual]

Handle emission of label Symbol.

rewriteInst [virtual]

Rewrite Inst for LFI, emitting any replacement through Out.

warning

Report a warning at the location of Inst.

Protected Data Members

Name

Description

Enabled

True when LFI rewriting is currently enabled.

InstInfo

Instruction info used to classify and query MCInsts.

RegInfo

Register info used for register‐modification queries.

Non-Member Functions

Name

Description

createLFIAsmParser

Create an LFI assembly parser extension bound to rewriter Exp.

Created with MrDocs