clang 22.0.0git
clang::threadSafety::til::Branch Class Reference

A conditional branch to two other blocks. More...

#include "clang/Analysis/Analyses/ThreadSafetyTIL.h"

Inheritance diagram for clang::threadSafety::til::Branch:
[legend]

Public Member Functions

 Branch (SExpr *C, BasicBlock *T, BasicBlock *E)
 Branch (const Branch &Br, SExpr *C, BasicBlock *T, BasicBlock *E)
const SExprcondition () const
SExprcondition ()
const BasicBlockthenBlock () const
BasicBlockthenBlock ()
const BasicBlockelseBlock () const
BasicBlockelseBlock ()
ArrayRef< BasicBlock * > successors () const
 Return the list of basic blocks that this terminator can branch to.
template<class V>
V::R_SExpr traverse (V &Vs, typename V::R_Ctx Ctx)
template<class C>
C::CType compare (const Branch *E, C &Cmp) const
Public Member Functions inherited from clang::threadSafety::til::Terminator
ArrayRef< BasicBlock * > successors () const
 Return the list of basic blocks that this terminator can branch to.
Public Member Functions inherited from clang::threadSafety::til::SExpr
 SExpr ()=delete
TIL_Opcode opcode () const
void * operator new (size_t S, MemRegionRef &R)
void * operator new (size_t)=delete
 SExpr objects must be created in an arena.
void operator delete (void *)=delete
 SExpr objects cannot be deleted.
unsigned id () const
 Returns the instruction ID for this expression.
BasicBlockblock () const
 Returns the block, if this is an instruction in a basic block, otherwise returns null.
void setID (BasicBlock *B, unsigned id)
 Set the basic block and instruction ID for this expression.

Static Public Member Functions

static bool classof (const SExpr *E)
Static Public Member Functions inherited from clang::threadSafety::til::Terminator
static bool classof (const SExpr *E)

Additional Inherited Members

Protected Member Functions inherited from clang::threadSafety::til::Terminator
 Terminator (TIL_Opcode Op)
 Terminator (const SExpr &E)
Protected Member Functions inherited from clang::threadSafety::til::SExpr
 SExpr (TIL_Opcode Op)
 SExpr (const SExpr &E)
SExproperator= (const SExpr &)=delete
Protected Attributes inherited from clang::threadSafety::til::SExpr
const TIL_Opcode Opcode
unsigned char Reserved = 0
unsigned short Flags = 0
unsigned SExprID = 0
BasicBlockBlock = nullptr

Detailed Description

A conditional branch to two other blocks.

Note that unlike Goto, Branch does not have an index. The target blocks must be child-blocks, and cannot have Phi nodes.

Definition at line 1413 of file ThreadSafetyTIL.h.

Constructor & Destructor Documentation

◆ Branch() [1/2]

clang::threadSafety::til::Branch::Branch ( SExpr * C,
BasicBlock * T,
BasicBlock * E )
inline

Definition at line 1415 of file ThreadSafetyTIL.h.

References clang::C, clang::T, and clang::threadSafety::til::Terminator::Terminator().

Referenced by Branch(), and compare().

◆ Branch() [2/2]

clang::threadSafety::til::Branch::Branch ( const Branch & Br,
SExpr * C,
BasicBlock * T,
BasicBlock * E )
inline

Member Function Documentation

◆ classof()

bool clang::threadSafety::til::Branch::classof ( const SExpr * E)
inlinestatic

Definition at line 1427 of file ThreadSafetyTIL.h.

References clang::threadSafety::til::SExpr::opcode().

◆ compare()

template<class C>
C::CType clang::threadSafety::til::Branch::compare ( const Branch * E,
C & Cmp ) const
inline

Definition at line 1450 of file ThreadSafetyTIL.h.

References Branch(), and clang::C.

◆ condition() [1/2]

SExpr * clang::threadSafety::til::Branch::condition ( )
inline

Definition at line 1430 of file ThreadSafetyTIL.h.

◆ condition() [2/2]

const SExpr * clang::threadSafety::til::Branch::condition ( ) const
inline

◆ elseBlock() [1/2]

BasicBlock * clang::threadSafety::til::Branch::elseBlock ( )
inline

Definition at line 1436 of file ThreadSafetyTIL.h.

◆ elseBlock() [2/2]

const BasicBlock * clang::threadSafety::til::Branch::elseBlock ( ) const
inline

◆ successors()

ArrayRef< BasicBlock * > clang::threadSafety::til::Branch::successors ( ) const
inline

Return the list of basic blocks that this terminator can branch to.

Definition at line 1439 of file ThreadSafetyTIL.h.

◆ thenBlock() [1/2]

BasicBlock * clang::threadSafety::til::Branch::thenBlock ( )
inline

Definition at line 1433 of file ThreadSafetyTIL.h.

◆ thenBlock() [2/2]

const BasicBlock * clang::threadSafety::til::Branch::thenBlock ( ) const
inline

◆ traverse()

template<class V>
V::R_SExpr clang::threadSafety::til::Branch::traverse ( V & Vs,
typename V::R_Ctx Ctx )
inline

Definition at line 1442 of file ThreadSafetyTIL.h.

References V.


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