Class Operand
An operand of an Instruction
. The operand represents a use of the result of one instruction
(the defining instruction) in another instruction (the use instruction)
Import path
import semmle.code.cpp.ir.IR
Direct supertypes
Known direct subtypes
Predicates
getAnyDef | Gets the |
getDef | Gets the |
getDefinitionOverlap | Gets the overlap relationship between the operand’s definition and its use. |
getDumpId | Gets a string that uniquely identifies this operand on its use instruction. |
getDumpLabel | Gets a prefix to use when dumping the operand in an operand list. |
getDumpSortOrder | Get the order in which the operand should be sorted in the operand list. |
getDumpString | Gets a string describing this operand, suitable for display in IR dumps. This consists of the result ID of the instruction consumed by the operand, plus a label identifying the operand kind. |
getEnclosingIRFunction | Gets the function that contains this operand. |
getIRType | Gets the language-neutral type of the value consumed by this operand. This is usually the same as the result type of the definition instruction consumed by this operand. For register operands, this is always the case. For some memory operands, the operand type may be different from the definition type, such as in the case of a partial read or a read from a pointer that has been cast to a different type. |
getLanguageType | Gets the type of the value consumed by this operand. This is usually the same as the result type of the definition instruction consumed by this operand. For register operands, this is always the case. For some memory operands, the operand type may be different from the definition type, such as in the case of a partial read or a read from a pointer that has been cast to a different type. |
getLocation | Gets the location of the source code for this operand. By default this is where the operand is used, but some subclasses may override this using |
getSize | Gets the size of the value consumed by this operand, in bytes. If the operand does not have a known constant size, this predicate does not hold. |
getType | Gets the type of the value consumed by this operand. This is usually the same as the result type of the definition instruction consumed by this operand. For register operands, this is always the case. For some memory operands, the operand type may be different from the definition type, such as in the case of a partial read or a read from a pointer that has been cast to a different type. |
getUse | Gets the |
isDefinitionInexact | Holds if the result of the definition instruction does not exactly overlap this use. |
isGLValue | Holds if the value consumed by this operand is a glvalue. If this holds, the value of the operand represents the address of a location, and the type of the location is given by |
toString | Gets a textual representation of this element. |