clang  9.0.0
Public Member Functions | List of all members
clang::CFGBlock::AdjacentBlock Class Reference

This class represents a potential adjacent block in the CFG. More...

#include "clang/Analysis/CFG.h"

Public Member Functions

 AdjacentBlock (CFGBlock *B, bool IsReachable)
 Construct an AdjacentBlock with a possibly unreachable block. More...
 
 AdjacentBlock (CFGBlock *B, CFGBlock *AlternateBlock)
 Construct an AdjacentBlock with a reachable block and an alternate unreachable block. More...
 
CFGBlockgetReachableBlock () const
 Get the reachable block, if one exists. More...
 
CFGBlockgetPossiblyUnreachableBlock () const
 Get the potentially unreachable block. More...
 
 operator CFGBlock * () const
 Provide an implicit conversion to CFGBlock* so that AdjacentBlock can be substituted for CFGBlock*. More...
 
CFGBlockoperator* () const
 
CFGBlockoperator-> () const
 
bool isReachable () const
 

Detailed Description

This class represents a potential adjacent block in the CFG.

It encodes whether or not the block is actually reachable, or can be proved to be trivially unreachable. For some cases it allows one to encode scenarios where a block was substituted because the original (now alternate) block is unreachable.

Definition at line 639 of file CFG.h.

Constructor & Destructor Documentation

◆ AdjacentBlock() [1/2]

CFGBlock::AdjacentBlock::AdjacentBlock ( CFGBlock B,
bool  IsReachable 
)

Construct an AdjacentBlock with a possibly unreachable block.

Definition at line 4907 of file CFG.cpp.

◆ AdjacentBlock() [2/2]

CFGBlock::AdjacentBlock::AdjacentBlock ( CFGBlock B,
CFGBlock AlternateBlock 
)

Construct an AdjacentBlock with a reachable block and an alternate unreachable block.

Definition at line 4912 of file CFG.cpp.

Member Function Documentation

◆ getPossiblyUnreachableBlock()

CFGBlock* clang::CFGBlock::AdjacentBlock::getPossiblyUnreachableBlock ( ) const
inline

Get the potentially unreachable block.

Definition at line 663 of file CFG.h.

Referenced by clang::CFGBlock::addSuccessor().

◆ getReachableBlock()

CFGBlock* clang::CFGBlock::AdjacentBlock::getReachableBlock ( ) const
inline

Get the reachable block, if one exists.

Definition at line 658 of file CFG.h.

Referenced by clang::CFGBlock::addSuccessor().

◆ isReachable()

bool clang::CFGBlock::AdjacentBlock::isReachable ( ) const
inline

Definition at line 681 of file CFG.h.

References Parent.

Referenced by clang::CFGBlock::addSuccessor().

◆ operator CFGBlock *()

clang::CFGBlock::AdjacentBlock::operator CFGBlock * ( ) const
inline

Provide an implicit conversion to CFGBlock* so that AdjacentBlock can be substituted for CFGBlock*.

Definition at line 669 of file CFG.h.

◆ operator*()

CFGBlock& clang::CFGBlock::AdjacentBlock::operator* ( ) const
inline

Definition at line 673 of file CFG.h.

◆ operator->()

CFGBlock* clang::CFGBlock::AdjacentBlock::operator-> ( ) const
inline

Definition at line 677 of file CFG.h.


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