CodeQL library for C/C++
codeql/cpp-all 0.12.12-dev (changelog, source)
Search

Class IRBlockBase

A basic block in the IR. A basic block consists of a sequence of Instructions with the only incoming edges at the beginning of the sequence and the only outgoing edges at the end of the sequence.

This class does not contain any members that query the predecessor or successor edges of the block. This allows different classes that extend IRBlockBase to expose different subsets of edges (e.g. ignoring unreachable edges).

Most consumers should use the class IRBlock.

Import path

import semmle.code.cpp.ir.implementation.unaliased_ssa.IRBlock

Direct supertypes

Known direct subtypes

    Predicates

    getAPhiInstruction

    Get the Phi instructions that appear at the start of this block.

    getAnInstruction

    Gets an instruction in this block. This includes Phi instructions.

    getDisplayIndex

    INTERNAL: Do not use.

    getEnclosingFunction

    Gets the Function that contains this block.

    getEnclosingIRFunction

    Gets the IRFunction that contains this block.

    getFirstInstruction

    Gets the first non-Phi instruction in this block.

    getInstruction

    Gets the indexth non-Phi instruction in this block.

    getInstructionCount

    Gets the number of non-Phi instructions in this block.

    getLastInstruction

    Gets the last instruction in this block.

    getLocation

    Gets the source location of the first non-Phi instruction in this block.

    toString

    Gets a textual representation of this block.