dex++ 0.3.1
C++ and C API reference
Loading...
Searching...
No Matches
dex::Cfg Class Reference

Control-flow graph for a single method. More...

#include <analysis/cfg.hpp>

Public Member Functions

 Cfg ()=default
 
std::span< const BasicBlock > blocks () const
 
const BasicBlock & entry () const
 
const BasicBlock * block_at_offset (uint32_t code_unit_offset) const
 Locate the block whose start_offset == code_unit_offset.
 
bool empty () const
 

Detailed Description

Control-flow graph for a single method.

Blocks are stored in blocks() in increasing start_offset order, with the entry block at index 0. Edges reference target blocks by index, not pointer, so the structure is trivially copyable / movable.

Constructor & Destructor Documentation

◆ Cfg()

dex::Cfg::Cfg ( )
default

Member Function Documentation

◆ blocks()

std::span< const BasicBlock > dex::Cfg::blocks ( ) const
inline

◆ entry()

const BasicBlock & dex::Cfg::entry ( ) const
inline

◆ block_at_offset()

const BasicBlock * dex::Cfg::block_at_offset ( uint32_t  code_unit_offset) const

Locate the block whose start_offset == code_unit_offset.

Returns nullptr if no block starts at that offset.

◆ empty()

bool dex::Cfg::empty ( ) const
inline

The documentation for this class was generated from the following file: