Class TranslatedExpr::TranslatedExpr

The IR translation of some part of an expression. A single Expr may consist of multiple TranslatedExpr objects. Every Expr has a single TranslatedCoreExpr, which produces the result of the expression before any implicit lvalue-to-rvalue conversion. Any expression with an lvalue-to-rvalue conversion will also have a TranslatedLoad to perform that conversion on the original result. A few expressions have additional TranslatedExpr objects that compute intermediate values, such as the TranslatedAllocatorCall and TranslatedAllocationSize within the translation of a NewExpr.

Direct supertypes

Indirect supertypes

Known direct subtypes

Fields

Predicates

getAST

Gets the AST node being translated.

getEnclosingFunction

Gets the TranslatedFunction containing this expression.

getExpr

Gets the expression from which this TranslatedExpr is generated.

getFunction

Gets the Function that contains this element.

getResult

Gets the instruction that produces the result of the expression.

getResultType

Gets the type of the result produced by this expression.

producesExprResult

Holds if this TranslatedExpr produces the final result of the original expression from the AST.

Inherited predicates

getAChild

Get the immediate child elements of this element.

from TranslatedElement
getChild

Gets the immediate child element of this element. The id is unique among all children of this element, but the values are not necessarily consecutive.

from TranslatedElement
getChildSuccessor

Gets the successor instruction to which control should flow after the child element specified by child has finished execution.

from TranslatedElement
getExceptionSuccessorInstruction

Gets the instruction to which control should flow if an exception is thrown within this element. This will generally return first catch block of the nearest enclosing try, or the Unwind instruction for the function if there is no enclosing try.

from TranslatedElement
getFirstInstruction

Get the first instruction to be executed in the evaluation of this element.

from TranslatedElement
getId

Gets the an identifier string for the element. This string is unique within the scope of the element’s function.

from TranslatedElement
getInstruction

Gets the instruction generated by this element with tag tag.

from TranslatedElement
getInstructionBuiltInOperation

If the instruction specified by tag is a BuiltInInstruction, gets the built-in operation.

from TranslatedElement
getInstructionConstantValue

If the instruction specified by tag is a ConstantValueInstruction, gets the constant value for that instruction.

from TranslatedElement
getInstructionElementSize

If the instruction specified by tag is a PointerArithmeticInstruction, gets the size of the type pointed to by the pointer.

from TranslatedElement
getInstructionExceptionType

If the instruction specified by tag is a CatchByTypeInstruction, gets the type of the exception to be caught.

from TranslatedElement
getInstructionField

If the instruction specified by tag is a FieldInstruction, gets the Field for that instruction.

from TranslatedElement
getInstructionFunction

If the instruction specified by tag is a FunctionInstruction, gets the Function for that instruction.

from TranslatedElement
getInstructionInheritance

If the instruction specified by tag is an InheritanceConversionInstruction, gets the inheritance relationship for that instruction.

from TranslatedElement
getInstructionOperand

Gets the instruction whose result is consumed as an operand of the instruction specified by tag, with the operand specified by operandTag.

from TranslatedElement
getInstructionOperandSize

Gets the size of the memory operand specified by operandTag on the the instruction specified by tag. Only holds for operands whose type is UnknownType.

from TranslatedElement
getInstructionOperandType

Gets the type of the memory operand specified by operandTag on the the instruction specified by tag.

from TranslatedElement
getInstructionResultSize

If the instruction specified by tag has a result of type UnknownType, gets the size of the result in bytes. If the result does not have a knonwn constant size, this predicate does not hold.

from TranslatedElement
getInstructionStringLiteral

If the instruction specified by tag is a StringConstantInstruction, gets the StringLiteral for that instruction.

from TranslatedElement
getInstructionSuccessor

Gets the successor instruction of the instruction that was generated by this element for tag tag. The successor edge kind is specified by kind.

from TranslatedElement
getInstructionVariable

If the instruction specified by tag is a VariableInstruction, gets the IRVariable for that instruction.

from TranslatedElement
getParent

Gets the parent element of this element.

from TranslatedElement
getPrimaryInstructionForSideEffect

Gets the primary instruction for the side effect instruction that was generated by this element for tag tag.

from TranslatedElement
getTempVariable

Gets the temporary variable generated by this element with tag tag.

from TranslatedElement
hasInstruction

Holds if this element generates an instruction with opcode opcode and result type resultType. tag must be unique for each instruction generated from the same AST node (not just from the same TranslatedElement). If the instruction does not return a result, resultType should be VoidType.

from TranslatedElement
hasTempVariable

Holds if this element generates a temporary variable with type type. tag must be unique for each variable generated from the same AST node (not just from the same TranslatedElement).

from TranslatedElement
toStringfrom TranslatedElement