clang 22.0.0git
|
Compilation context for expressions. More...
#include "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/AST/ByteCode/Compiler.h"
Classes | |
struct | LabelInfo |
Protected Types | |
using | LabelTy = typename Emitter::LabelTy |
using | AddrTy = typename Emitter::AddrTy |
using | OptLabelTy = UnsignedOrNone |
using | CaseMap = llvm::DenseMap<const SwitchCase *, LabelTy> |
Protected Member Functions | |
bool | visitStmt (const Stmt *S) |
bool | visitExpr (const Expr *E, bool DestroyToplevelScope) override |
bool | visitFunc (const FunctionDecl *F) override |
bool | visitDeclAndReturn (const VarDecl *VD, const Expr *Init, bool ConstantContext) override |
Toplevel visitDeclAndReturn(). | |
void | emitCleanup () |
Emits scope cleanup instructions. | |
const RecordType * | getRecordTy (QualType Ty) |
Returns a record type from a record or pointer type. | |
Record * | getRecord (QualType Ty) |
Returns a record from a record or pointer type. | |
Record * | getRecord (const RecordDecl *RD) |
const Function * | getFunction (const FunctionDecl *FD) |
Returns a function for the given FunctionDecl. | |
OptPrimType | classify (const Expr *E) const |
OptPrimType | classify (QualType Ty) const |
bool | canClassify (const Expr *E) const |
bool | canClassify (QualType T) const |
PrimType | classifyPrim (QualType Ty) const |
Classifies a known primitive type. | |
PrimType | classifyPrim (const Expr *E) const |
Classifies a known primitive expression. | |
bool | visit (const Expr *E) override |
Evaluates an expression and places the result on the stack. | |
bool | visitInitializer (const Expr *E) |
Compiles an initializer. | |
bool | visitAsLValue (const Expr *E) |
bool | discard (const Expr *E) |
Evaluates an expression for side effects and discards the result. | |
bool | delegate (const Expr *E) |
Just pass evaluation on to E . | |
VarCreationState | visitVarDecl (const VarDecl *VD, const Expr *Init, bool Toplevel=false, bool IsConstexprUnknown=false) |
Creates and initializes a variable from the given decl. | |
VarCreationState | visitDecl (const VarDecl *VD, bool IsConstexprUnknown=false) |
bool | visitAPValue (const APValue &Val, PrimType ValType, const Expr *E) |
Visit an APValue. | |
bool | visitAPValueInitializer (const APValue &Val, const Expr *E, QualType T) |
bool | visitDeclRef (const ValueDecl *D, const Expr *E) |
Visit the given decl as if we have a reference to it. | |
bool | visitBool (const Expr *E) |
Visits an expression and converts it to a boolean. | |
bool | visitInitList (ArrayRef< const Expr * > Inits, const Expr *ArrayFiller, const Expr *E) |
bool | visitArrayElemInit (unsigned ElemIndex, const Expr *Init, OptPrimType InitT) |
Pointer to the array(not the element!) must be on the stack when calling this. | |
bool | visitCallArgs (ArrayRef< const Expr * > Args, const FunctionDecl *FuncDecl, bool Activate, bool IsOperatorCall) |
unsigned | allocateLocalPrimitive (DeclTy &&Decl, PrimType Ty, bool IsConst, bool IsVolatile=false, const ValueDecl *ExtendingDecl=nullptr, ScopeKind SC=ScopeKind::Block, bool IsConstexprUnknown=false) |
Creates a local primitive value. | |
UnsignedOrNone | allocateLocal (DeclTy &&Decl, QualType Ty=QualType(), const ValueDecl *ExtendingDecl=nullptr, ScopeKind=ScopeKind::Block, bool IsConstexprUnknown=false) |
Allocates a space storing a local given its type. | |
UnsignedOrNone | allocateTemporary (const Expr *E) |
Protected Attributes | |
Context & | Ctx |
Current compilation context. | |
Program & | P |
Program to link to. | |
llvm::DenseMap< const ValueDecl *, Scope::Local > | Locals |
Variable to storage mapping. | |
llvm::DenseMap< const OpaqueValueExpr *, unsigned > | OpaqueExprs |
OpaqueValueExpr to location mapping. | |
VariableScope< Emitter > * | VarScope = nullptr |
Current scope. | |
std::optional< uint64_t > | ArrayIndex |
Current argument index. Needed to emit ArrayInitIndexExpr. | |
const Expr * | SourceLocDefaultExpr = nullptr |
DefaultInit- or DefaultArgExpr, needed for SourceLocExpr. | |
bool | DiscardResult = false |
Flag indicating if return value is to be discarded. | |
bool | InStmtExpr = false |
bool | ToLValue = false |
bool | Initializing = false |
Flag inidicating if we're initializing an already created variable. | |
const ValueDecl * | InitializingDecl = nullptr |
llvm::SmallVector< InitLink > | InitStack |
bool | InitStackActive = false |
OptPrimType | ReturnType |
Type of the expression returned by the function. | |
CaseMap | CaseLabels |
Switch case mapping. | |
llvm::SmallVector< LabelInfo > | LabelInfoStack |
Stack of label information for loops and switch statements. | |
const FunctionDecl * | CompilingFunction = nullptr |
Friends | |
class | VariableScope< Emitter > |
class | LocalScope< Emitter > |
class | DestructorScope< Emitter > |
class | DeclScope< Emitter > |
class | InitLinkScope< Emitter > |
class | InitStackScope< Emitter > |
class | OptionScope< Emitter > |
class | ArrayIndexScope< Emitter > |
class | SourceLocScope< Emitter > |
struct | InitLink |
class | LoopScope< Emitter > |
class | LabelScope< Emitter > |
class | SwitchScope< Emitter > |
class | StmtExprScope< Emitter > |
class | LocOverrideScope< Emitter > |
Additional Inherited Members | |
Public Attributes inherited from clang::StmtVisitorBase< llvm::make_const_ptr, Compiler< Emitter >, bool, ParamTys... > | |
ParamTys | P |
Compilation context for expressions.
Definition at line 109 of file Compiler.h.
|
protected |
Definition at line 114 of file Compiler.h.
|
protected |
Definition at line 116 of file Compiler.h.
|
protected |
Definition at line 113 of file Compiler.h.
|
protected |
Definition at line 115 of file Compiler.h.
|
inline |
Initializes the compiler and the backend emitter.
Definition at line 140 of file Compiler.h.
|
protected |
Allocates a space storing a local given its type.
Definition at line 4595 of file Compiler.cpp.
References clang::Expr::getType(), clang::QualType::getTypePtr(), clang::interp::Init(), clang::interp::Descriptor::InlineDescMD, clang::interp::Descriptor::IsConstexprUnknown, clang::QualType::isConstQualified(), clang::QualType::isNull(), Locals, P, and VarScope.
Referenced by visit(), VisitBinaryOperator(), VisitBuiltinCallExpr(), visitCallArgs(), VisitCallExpr(), VisitCastExpr(), VisitComplexUnaryOperator(), VisitCompoundLiteralExpr(), VisitCXXConstructExpr(), VisitCXXScalarValueInitExpr(), visitExpr(), VisitExtVectorElementExpr(), VisitMaterializeTemporaryExpr(), visitVarDecl(), and VisitVectorUnaryOperator().
|
protected |
Creates a local primitive value.
Definition at line 4574 of file Compiler.cpp.
References clang::interp::Descriptor::InlineDescMD, clang::isa(), clang::interp::Descriptor::IsConstexprUnknown, Locals, P, and VarScope.
Referenced by VisitCallExpr(), VisitCastExpr(), VisitComplexBinOp(), VisitComplexUnaryOperator(), VisitCompoundAssignOperator(), VisitCompoundLiteralExpr(), VisitConvertVectorExpr(), VisitCXXNewExpr(), VisitExtVectorElementExpr(), VisitFloatCompoundAssignOperator(), VisitMaterializeTemporaryExpr(), VisitOpaqueValueExpr(), VisitShuffleVectorExpr(), visitSwitchStmt(), visitVarDecl(), VisitVectorBinOp(), and VisitVectorUnaryOperator().
|
protected |
Definition at line 4632 of file Compiler.cpp.
References clang::interp::VariableScope< Emitter >::addLocal(), clang::interp::VariableScope< Emitter >::getParent(), clang::Expr::getType(), clang::QualType::getTypePtr(), clang::interp::Descriptor::InlineDescMD, clang::QualType::isConstQualified(), clang::Type::isRecordType(), P, and VarScope.
Referenced by VisitCastExpr(), VisitComplexBinOp(), VisitImaginaryLiteral(), and VisitVectorBinOp().
|
inlineprotected |
Definition at line 274 of file Compiler.h.
References Ctx.
Referenced by visit(), visitCallArgs(), VisitCastExpr(), VisitCXXConstructExpr(), visitInitializer(), and VisitVectorBinOp().
|
inlineprotected |
Definition at line 275 of file Compiler.h.
|
inlineprotected |
Definition at line 272 of file Compiler.h.
References Ctx.
Referenced by classifyPrim(), classifyPrim(), visitAPValueInitializer(), VisitArrayInitLoopExpr(), VisitArraySubscriptExpr(), VisitBinaryOperator(), visitBool(), VisitBuiltinCallExpr(), visitCallArgs(), VisitCallExpr(), VisitCastExpr(), VisitComplexUnaryOperator(), VisitCompoundAssignOperator(), VisitCompoundLiteralExpr(), VisitConstantExpr(), VisitCXXConstructExpr(), VisitCXXInheritedCtorInitExpr(), VisitCXXNewExpr(), VisitCXXReinterpretCastExpr(), VisitCXXScalarValueInitExpr(), visitDeclAndReturn(), visitDeclRef(), visitExpr(), VisitFloatCompoundAssignOperator(), visitFunc(), VisitImplicitValueInitExpr(), visitInitList(), VisitLambdaExpr(), VisitLogicalBinOp(), VisitMaterializeTemporaryExpr(), VisitMemberExpr(), VisitOpaqueValueExpr(), VisitPointerArithBinOp(), VisitPointerCompoundAssignOperator(), VisitUnaryOperator(), and visitVarDecl().
|
inlineprotected |
Definition at line 273 of file Compiler.h.
References Ctx.
|
inlineprotected |
Classifies a known primitive expression.
Definition at line 285 of file Compiler.h.
References classify(), and clang::T.
|
inlineprotected |
Classifies a known primitive type.
Definition at line 278 of file Compiler.h.
References classify(), and clang::T.
Referenced by visitAPValueInitializer(), VisitArraySubscriptExpr(), VisitBinaryOperator(), VisitBuiltinCallExpr(), VisitCallExpr(), VisitCastExpr(), VisitComplexBinOp(), VisitComplexUnaryOperator(), VisitConceptSpecializationExpr(), VisitConvertVectorExpr(), VisitCXXNewExpr(), VisitCXXScalarValueInitExpr(), VisitCXXStdInitializerListExpr(), visitDeclRef(), VisitExtVectorElementExpr(), VisitFixedPointBinOp(), VisitFixedPointLiteral(), VisitFloatCompoundAssignOperator(), VisitGNUNullExpr(), VisitImaginaryLiteral(), VisitImplicitValueInitExpr(), visitInitList(), VisitObjCBoxedExpr(), VisitOffsetOfExpr(), VisitPointerArithBinOp(), VisitRequiresExpr(), VisitShuffleVectorExpr(), VisitSourceLocExpr(), visitSwitchStmt(), VisitTypeTraitExpr(), VisitUnaryOperator(), VisitVectorBinOp(), and VisitVectorUnaryOperator().
Just pass evaluation on to E
.
This leaves all the parsing flags intact.
Definition at line 4176 of file Compiler.cpp.
References clang::StmtVisitorBase< llvm::make_const_ptr, Compiler< Emitter >, bool, ParamTys... >::Visit().
Referenced by VisitAbstractConditionalOperator(), VisitBinaryOperator(), VisitCastExpr(), VisitChooseExpr(), VisitComplexUnaryOperator(), VisitCompoundLiteralExpr(), VisitConstantExpr(), VisitCXXBindTemporaryExpr(), VisitCXXDefaultArgExpr(), VisitCXXDefaultInitExpr(), VisitCXXReinterpretCastExpr(), VisitCXXRewrittenBinaryOperator(), VisitExprWithCleanups(), VisitFixedPointUnaryOperator(), VisitGenericSelectionExpr(), visitInitList(), VisitMaterializeTemporaryExpr(), VisitObjCEncodeExpr(), VisitPackIndexingExpr(), VisitParenExpr(), VisitPredefinedExpr(), VisitPseudoObjectExpr(), VisitStmtExpr(), VisitSubstNonTypeTemplateParmExpr(), VisitUnaryOperator(), and VisitVectorUnaryOperator().
Evaluates an expression for side effects and discards the result.
Definition at line 4170 of file Compiler.cpp.
References clang::StmtVisitorBase< llvm::make_const_ptr, Compiler< Emitter >, bool, ParamTys... >::Visit().
|
protected |
Emits scope cleanup instructions.
Definition at line 7053 of file Compiler.cpp.
|
protected |
Returns a function for the given FunctionDecl.
If the function does not exist yet, it is compiled.
Definition at line 4673 of file Compiler.cpp.
References Ctx.
Referenced by VisitCallExpr(), VisitCXXConstructExpr(), VisitCXXInheritedCtorInitExpr(), VisitCXXNewExpr(), and visitDeclRef().
|
protected |
Definition at line 4668 of file Compiler.cpp.
References P.
Returns a record from a record or pointer type.
Definition at line 4661 of file Compiler.cpp.
References getRecord(), and getRecordTy().
Referenced by getRecord(), visitAPValueInitializer(), VisitCXXConstructExpr(), VisitCXXStdInitializerListExpr(), VisitCXXUuidofExpr(), VisitImplicitValueInitExpr(), visitInitList(), VisitMemberExpr(), and VisitSourceLocExpr().
Returns a record type from a record or pointer type.
Definition at line 4655 of file Compiler.cpp.
References clang::Type::getAsCanonical().
Referenced by getRecord().
Evaluates an expression and places the result on the stack.
If the expression is of composite type, a local variable will be created and a pointer to said variable will be placed on the stack.
Definition at line 4208 of file Compiler.cpp.
References allocateLocal(), canClassify(), clang::interp::discard(), clang::Expr::getType(), clang::Expr::isGLValue(), clang::QualType::isNull(), clang::Type::isVoidType(), stripDerivedToBaseCasts(), clang::interp::InitLink::Temp(), ToLValue, clang::StmtVisitorBase< llvm::make_const_ptr, Compiler< Emitter >, bool, ParamTys... >::Visit(), and visitInitializer().
Referenced by visitAPValue(), visitArrayElemInit(), VisitArraySubscriptExpr(), VisitBinaryOperator(), visitBool(), VisitBuiltinCallExpr(), visitCallArgs(), VisitCallExpr(), VisitCastExpr(), VisitComplexBinOp(), VisitComplexUnaryOperator(), VisitCompoundAssignOperator(), VisitCompoundLiteralExpr(), VisitConvertVectorExpr(), VisitCXXBindTemporaryExpr(), VisitCXXConstructExpr(), VisitCXXDeleteExpr(), VisitCXXNewExpr(), VisitCXXStdInitializerListExpr(), VisitCXXTypeidExpr(), visitDeclAndReturn(), visitDeclRef(), VisitEmbedExpr(), visitExpr(), VisitExtVectorElementExpr(), VisitFixedPointBinOp(), VisitFixedPointUnaryOperator(), VisitFloatCompoundAssignOperator(), visitInitList(), VisitLambdaExpr(), VisitMaterializeTemporaryExpr(), VisitMemberExpr(), VisitOffsetOfExpr(), VisitOpaqueValueExpr(), VisitPointerArithBinOp(), VisitPointerCompoundAssignOperator(), visitReturnStmt(), VisitShuffleVectorExpr(), VisitSourceLocExpr(), visitSwitchStmt(), VisitUnaryOperator(), visitVarDecl(), VisitVectorBinOp(), and VisitVectorUnaryOperator().
bool Compiler::VisitAbstractConditionalOperator | ( | const AbstractConditionalOperator * | E | ) |
Definition at line 2480 of file Compiler.cpp.
References clang::Condition, delegate(), clang::interp::LocalScope< Emitter >::destroyLocals(), clang::interp::discard(), clang::interp::getBoolValue(), clang::AbstractConditionalOperator::getCond(), clang::AbstractConditionalOperator::getFalseExpr(), clang::AbstractConditionalOperator::getTrueExpr(), and visitBool().
bool Compiler::VisitAddrLabelExpr | ( | const AddrLabelExpr * | E | ) |
Definition at line 3944 of file Compiler.cpp.
References clang::Expr::getType(), and clang::Type::isVoidPointerType().
|
protected |
Visit an APValue.
Definition at line 4926 of file Compiler.cpp.
References DiscardResult, clang::APValue::getFloat(), clang::APValue::getInt(), clang::APValue::getLValueBase(), clang::APValue::getMemberPointerDecl(), clang::APValue::isFloat(), clang::APValue::isInt(), clang::APValue::isLValue(), clang::APValue::isMemberPointer(), clang::APValue::isNullPointer(), visit(), and visitDeclRef().
Referenced by visitAPValueInitializer(), VisitConstantExpr(), visitDeclRef(), VisitSourceLocExpr(), and VisitTypeTraitExpr().
|
protected |
Definition at line 4954 of file Compiler.cpp.
References classify(), classifyPrim(), clang::APValue::getArrayInitializedElt(), clang::APValue::getArraySize(), clang::interp::Record::getField(), clang::FieldDecl::getParent(), getRecord(), clang::APValue::getStructField(), clang::APValue::getStructNumFields(), clang::APValue::getUnionField(), clang::APValue::getUnionValue(), clang::APValue::isArray(), clang::APValue::isStruct(), clang::APValue::isUnion(), clang::T, visitAPValue(), and visitAPValueInitializer().
Referenced by visitAPValueInitializer(), VisitCXXUuidofExpr(), and visitDeclRef().
|
protected |
Pointer to the array(not the element!) must be on the stack when calling this.
Definition at line 2067 of file Compiler.cpp.
References clang::interp::InitLink::Elem(), clang::interp::Init(), visit(), and visitInitializer().
Referenced by VisitArrayInitLoopExpr(), VisitCastExpr(), VisitImaginaryLiteral(), and visitInitList().
bool Compiler::VisitArrayInitIndexExpr | ( | const ArrayInitIndexExpr * | E | ) |
Definition at line 2404 of file Compiler.cpp.
References ArrayIndex.
bool Compiler::VisitArrayInitLoopExpr | ( | const ArrayInitLoopExpr * | E | ) |
Definition at line 2413 of file Compiler.cpp.
References classify(), clang::interp::LocalScope< Emitter >::destroyLocals(), clang::interp::discard(), DiscardResult, clang::ArrayInitLoopExpr::getArraySize(), clang::ArrayInitLoopExpr::getCommonExpr(), clang::ArrayInitLoopExpr::getSubExpr(), Initializing, and visitArrayElemInit().
bool Compiler::VisitArraySubscriptExpr | ( | const ArraySubscriptExpr * | E | ) |
Definition at line 1751 of file Compiler.cpp.
References classify(), classifyPrim(), DiscardResult, clang::ArraySubscriptExpr::getBase(), clang::ArraySubscriptExpr::getIdx(), clang::ArraySubscriptExpr::getLHS(), clang::ArraySubscriptExpr::getRHS(), clang::Expr::getType(), clang::Expr::isGLValue(), clang::interp::PT_Ptr, clang::Success, clang::T, and visit().
bool Compiler::VisitArrayTypeTraitExpr | ( | const ArrayTypeTraitExpr * | E | ) |
Definition at line 3054 of file Compiler.cpp.
References DiscardResult, and clang::ArrayTypeTraitExpr::getValue().
Definition at line 4243 of file Compiler.cpp.
References clang::StmtVisitorBase< llvm::make_const_ptr, Compiler< Emitter >, bool, ParamTys... >::Visit().
Referenced by VisitBuiltinCallExpr().
bool Compiler::visitAttributedStmt | ( | const AttributedStmt * | S | ) |
Definition at line 6051 of file Compiler.cpp.
References Ctx, clang::AttributedStmt::getAttrs(), clang::AttributedStmt::getSubStmt(), clang::Expr::HasSideEffects(), clang::isa(), clang::Expr::isValueDependent(), visitBool(), and visitStmt().
Referenced by visitStmt().
bool Compiler::VisitBinaryOperator | ( | const BinaryOperator * | E | ) |
Definition at line 841 of file Compiler.cpp.
References allocateLocal(), classify(), classifyPrim(), Ctx, delegate(), clang::interp::discard(), DiscardResult, clang::BinaryOperator::getLHS(), clang::BinaryOperator::getOpcode(), clang::BinaryOperator::getRHS(), clang::Expr::getType(), Initializing, clang::Type::isAnyComplexType(), clang::BinaryOperator::isCommaOp(), clang::BinaryOperator::isComparisonOp(), clang::Type::isFixedPointType(), clang::Type::isFloatingType(), clang::BinaryOperator::isLogicalOp(), clang::BinaryOperator::isPtrMemOp(), clang::interp::isPtrType(), clang::Type::isVectorType(), clang::Type::isVoidType(), clang::interp::LT(), clang::interp::PT_Bool, clang::interp::PT_MemberPtr, clang::Result, clang::T, visit(), VisitComplexBinOp(), VisitFixedPointBinOp(), VisitLogicalBinOp(), VisitPointerArithBinOp(), and VisitVectorBinOp().
Definition at line 3792 of file Compiler.cpp.
References Ctx, DiscardResult, and clang::Func.
Visits an expression and converts it to a boolean.
Definition at line 4249 of file Compiler.cpp.
References classify(), clang::Expr::getType(), clang::Type::isAnyComplexType(), clang::interp::PT_Bool, clang::interp::PT_Float, clang::interp::PT_Ptr, clang::T, and visit().
Referenced by VisitAbstractConditionalOperator(), visitAttributedStmt(), visitCXXForRangeStmt(), visitDoStmt(), visitForStmt(), visitIfStmt(), VisitLogicalBinOp(), VisitUnaryOperator(), and visitWhileStmt().
Definition at line 5877 of file Compiler.cpp.
References clang::C, clang::LoopControlStmt::getNamedLoopOrSwitch(), LabelInfoStack, and VarScope.
Referenced by visitStmt().
bool Compiler::VisitBuiltinBitCastExpr | ( | const BuiltinBitCastExpr * | E | ) |
Definition at line 777 of file Compiler.cpp.
bool Compiler::VisitBuiltinCallExpr | ( | const CallExpr * | E, |
unsigned | BuiltinID ) |
Definition at line 5020 of file Compiler.cpp.
References allocateLocal(), clang::CallExpr::arguments(), classify(), classifyPrim(), DiscardResult, clang::CallExpr::getArg(), clang::CallExpr::getNumArgs(), clang::Expr::getType(), Initializing, clang::Expr::isGLValue(), clang::interp::Context::isUnevaluatedBuiltin(), clang::Type::isVoidType(), ReturnType, visit(), and visitAsLValue().
Referenced by VisitCallExpr().
|
protected |
Definition at line 2089 of file Compiler.cpp.
References clang::interp::Activate(), allocateLocal(), clang::interp::Call, canClassify(), classify(), clang::interp::collectNonNullArgs(), clang::FunctionDecl::getParamDecl(), clang::Decl::hasAttr(), clang::interp::PT_Ptr, clang::interp::InitLink::Temp(), VarScope, visit(), and visitInitializer().
Referenced by VisitCallExpr().
Definition at line 5106 of file Compiler.cpp.
References clang::interp::align(), allocateLocal(), allocateLocalPrimitive(), clang::interp::Call, clang::cast(), classify(), classifyPrim(), CompilingFunction, Ctx, clang::interp::LocalScope< Emitter >::destroyLocals(), clang::interp::discard(), DiscardResult, clang::Func, clang::CallExpr::getArg(), clang::CallExpr::getArgs(), clang::FunctionDecl::getBuiltinID(), clang::CallExpr::getCallee(), clang::CallExpr::getCallReturnType(), clang::DeclarationName::getCXXOverloadedOperator(), clang::NamedDecl::getDeclName(), clang::CallExpr::getDirectCallee(), getFunction(), clang::CallExpr::getNumArgs(), Initializing, clang::isa(), clang::DeclarationName::isAnyOperatorNew(), clang::FunctionDecl::isUsableAsGlobalAllocationFunctionInConstantEvaluation(), clang::interp::primSize(), clang::interp::PT_MemberPtr, clang::interp::PT_Ptr, ReturnType, stripCheckedDerivedToBaseCasts(), clang::T, visit(), VisitBuiltinCallExpr(), and visitCallArgs().
Definition at line 6028 of file Compiler.cpp.
References CaseLabels, clang::CaseStmt::getSubStmt(), and visitStmt().
Referenced by visitStmt().
Definition at line 212 of file Compiler.cpp.
References allocateLocal(), allocateLocalPrimitive(), allocateTemporary(), canClassify(), clang::Type::castAs(), clang::Type::castAsEnumDecl(), classify(), classifyPrim(), Ctx, delegate(), clang::interp::discard(), DiscardResult, clang::Type::getAs(), clang::CastExpr::getCastKind(), clang::MemberPointerType::getMostRecentCXXRecordDecl(), clang::VectorType::getNumElements(), clang::Type::getPointeeType(), clang::interp::getRoundingMode(), clang::CastExpr::getSubExpr(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::QualType::getTypePtr(), Initializing, clang::interp::Descriptor::InlineDescMD, clang::Type::isAnyComplexType(), clang::Type::isAtomicType(), clang::Type::isBooleanType(), clang::Type::isEnumeralType(), clang::Type::isFloatingType(), clang::Type::isFunctionPointerType(), clang::Type::isIntegralOrEnumerationType(), clang::QualType::isNull(), clang::Type::isPointerOrReferenceType(), clang::Type::isPointerType(), clang::interp::isPtrType(), clang::Type::isRealFloatingType(), clang::Type::isReferenceType(), clang::interp::isSignedType(), clang::Type::isVectorType(), clang::Type::isVoidPointerType(), clang::Type::isVoidType(), clang::QualType::isVolatileQualified(), Locals, P, clang::CastExpr::path(), clang::interp::PT_IntAP, clang::interp::PT_IntAPS, clang::interp::PT_MemberPtr, clang::interp::PT_Ptr, clang::interp::Reinterpret, clang::interp::Context::shouldBeGloballyIndexed(), clang::T, ToLValue, visit(), visitArrayElemInit(), and clang::interp::Volatile.
Referenced by VisitCXXDynamicCastExpr(), and VisitCXXReinterpretCastExpr().
bool Compiler::VisitCharacterLiteral | ( | const CharacterLiteral * | E | ) |
Definition at line 2643 of file Compiler.cpp.
References DiscardResult, and clang::CharacterLiteral::getValue().
bool Compiler::VisitChooseExpr | ( | const ChooseExpr * | E | ) |
Definition at line 3472 of file Compiler.cpp.
References delegate(), and clang::ChooseExpr::getChosenSubExpr().
bool Compiler::VisitComplexBinOp | ( | const BinaryOperator * | E | ) |
Definition at line 1143 of file Compiler.cpp.
References allocateLocalPrimitive(), allocateTemporary(), classifyPrim(), DiscardResult, clang::Type::getAs(), clang::ComplexType::getElementType(), clang::BinaryOperator::getLHS(), clang::BinaryOperator::getOpcode(), clang::BinaryOperator::getRHS(), clang::Expr::getType(), Initializing, clang::Type::isAnyComplexType(), clang::interp::PT_Float, clang::interp::PT_Ptr, and visit().
Referenced by VisitBinaryOperator().
bool Compiler::VisitComplexUnaryOperator | ( | const UnaryOperator * | E | ) |
Definition at line 6669 of file Compiler.cpp.
References allocateLocal(), allocateLocalPrimitive(), classify(), classifyPrim(), delegate(), clang::interp::discard(), DiscardResult, clang::UnaryOperator::getOpcode(), clang::UnaryOperator::getSubExpr(), clang::Expr::getType(), Initializing, clang::Type::isAnyComplexType(), clang::Expr::isLValue(), clang::interp::PT_Bool, clang::interp::PT_Ptr, and visit().
Referenced by VisitUnaryOperator().
bool Compiler::VisitCompoundAssignOperator | ( | const CompoundAssignOperator * | E | ) |
Definition at line 2760 of file Compiler.cpp.
References allocateLocalPrimitive(), classify(), Ctx, DiscardResult, clang::CompoundAssignOperator::getComputationLHSType(), clang::BinaryOperator::getLHS(), clang::BinaryOperator::getOpcode(), clang::BinaryOperator::getRHS(), clang::Expr::getType(), clang::Type::isFloatingType(), clang::Type::isPointerType(), clang::Type::isVectorType(), clang::interp::LT(), clang::interp::PT_Float, clang::Expr::refersToBitField(), visit(), VisitFloatCompoundAssignOperator(), VisitPointerCompoundAssignOperator(), and VisitVectorBinOp().
bool Compiler::VisitCompoundLiteralExpr | ( | const CompoundLiteralExpr * | E | ) |
Definition at line 2981 of file Compiler.cpp.
References allocateLocal(), allocateLocalPrimitive(), classify(), delegate(), clang::interp::discard(), DiscardResult, clang::CompoundLiteralExpr::getInitializer(), clang::Expr::getType(), clang::interp::Init(), Initializing, clang::CompoundLiteralExpr::isFileScope(), clang::Expr::isLValue(), P, clang::T, visit(), and visitInitializer().
bool Compiler::visitCompoundStmt | ( | const CompoundStmt * | S | ) |
Definition at line 5495 of file Compiler.cpp.
References clang::CompoundStmt::body(), and visitStmt().
Referenced by visitStmt().
bool Compiler::VisitConceptSpecializationExpr | ( | const ConceptSpecializationExpr * | E | ) |
Definition at line 3895 of file Compiler.cpp.
References classifyPrim(), DiscardResult, clang::Expr::getType(), clang::ConceptSpecializationExpr::isSatisfied(), and clang::interp::PT_Bool.
bool Compiler::VisitConstantExpr | ( | const ConstantExpr * | E | ) |
Definition at line 2168 of file Compiler.cpp.
References classify(), delegate(), DiscardResult, clang::ConstantExpr::getAPValueResult(), clang::FullExpr::getSubExpr(), clang::Expr::getType(), clang::ConstantExpr::hasAPValueResult(), clang::T, and visitAPValue().
bool Compiler::visitContinueStmt | ( | const ContinueStmt * | S | ) |
Definition at line 5913 of file Compiler.cpp.
References clang::C, clang::LoopControlStmt::getNamedLoopOrSwitch(), LabelInfoStack, and VarScope.
Referenced by visitStmt().
bool Compiler::VisitConvertVectorExpr | ( | const ConvertVectorExpr * | E | ) |
Definition at line 3951 of file Compiler.cpp.
References allocateLocalPrimitive(), clang::Type::castAs(), classifyPrim(), Ctx, clang::interp::getRoundingMode(), clang::ConvertVectorExpr::getSrcExpr(), clang::Expr::getType(), Initializing, clang::interp::PT_Ptr, and visit().
bool Compiler::VisitCXXBindTemporaryExpr | ( | const CXXBindTemporaryExpr * | E | ) |
Definition at line 2962 of file Compiler.cpp.
References delegate(), DiscardResult, clang::CXXBindTemporaryExpr::getSubExpr(), Initializing, and visit().
bool Compiler::VisitCXXBoolLiteralExpr | ( | const CXXBoolLiteralExpr * | E | ) |
Definition at line 5351 of file Compiler.cpp.
References DiscardResult, and clang::CXXBoolLiteralExpr::getValue().
bool Compiler::VisitCXXConstructExpr | ( | const CXXConstructExpr * | E | ) |
Definition at line 3191 of file Compiler.cpp.
References clang::interp::align(), allocateLocal(), clang::CXXConstructExpr::arguments(), canClassify(), classify(), Ctx, DiscardResult, clang::Func, clang::CXXConstructExpr::getArg(), clang::CXXConstructExpr::getConstructor(), getFunction(), clang::CXXConstructExpr::getNumArgs(), getRecord(), clang::Expr::getType(), clang::ConstantArrayType::getZExtSize(), Initializing, clang::CXXConstructorDecl::isCopyOrMoveConstructor(), clang::FunctionDecl::isDefaulted(), clang::Expr::isTemporaryObject(), clang::FunctionDecl::isTrivial(), clang::interp::primSize(), clang::interp::PT_Ptr, clang::CXXConstructExpr::requiresZeroInitialization(), clang::T, visit(), and visitInitializer().
bool Compiler::VisitCXXDefaultArgExpr | ( | const CXXDefaultArgExpr * | E | ) |
Definition at line 5344 of file Compiler.cpp.
References delegate(), and clang::CXXDefaultArgExpr::getExpr().
bool Compiler::VisitCXXDefaultInitExpr | ( | const CXXDefaultInitExpr * | E | ) |
Definition at line 5337 of file Compiler.cpp.
References delegate(), and clang::CXXDefaultInitExpr::getExpr().
bool Compiler::VisitCXXDeleteExpr | ( | const CXXDeleteExpr * | E | ) |
Definition at line 3776 of file Compiler.cpp.
References clang::CXXDeleteExpr::getArgument(), clang::CXXDeleteExpr::getOperatorDelete(), clang::CXXDeleteExpr::isArrayForm(), clang::CXXDeleteExpr::isGlobalDelete(), and visit().
bool Compiler::VisitCXXDynamicCastExpr | ( | const CXXDynamicCastExpr * | E | ) |
Definition at line 3171 of file Compiler.cpp.
References Ctx, clang::interp::Dynamic, and VisitCastExpr().
bool Compiler::visitCXXForRangeStmt | ( | const CXXForRangeStmt * | S | ) |
Definition at line 5821 of file Compiler.cpp.
References clang::Cond, clang::interp::LocalScope< Emitter >::destroyLocals(), clang::interp::discard(), clang::CXXForRangeStmt::getBeginStmt(), clang::CXXForRangeStmt::getBody(), clang::CXXForRangeStmt::getCond(), clang::CXXForRangeStmt::getEndStmt(), clang::CXXForRangeStmt::getInc(), clang::CXXForRangeStmt::getInit(), clang::CXXForRangeStmt::getLoopVarStmt(), clang::CXXForRangeStmt::getRangeStmt(), clang::interp::Inc(), clang::interp::Init(), visitBool(), visitDeclStmt(), and visitStmt().
Referenced by visitStmt().
bool Compiler::VisitCXXInheritedCtorInitExpr | ( | const CXXInheritedCtorInitExpr * | E | ) |
Definition at line 3485 of file Compiler.cpp.
References clang::interp::align(), classify(), clang::CXXInheritedCtorInitExpr::getConstructor(), getFunction(), clang::interp::Function::hasRVO(), clang::interp::Function::hasThisPointer(), clang::FunctionDecl::isTrivial(), clang::FunctionDecl::parameters(), clang::interp::primSize(), and clang::interp::PT_Ptr.
bool Compiler::VisitCXXNewExpr | ( | const CXXNewExpr * | E | ) |
Definition at line 3518 of file Compiler.cpp.
References allocateLocalPrimitive(), classify(), classifyPrim(), Ctx, clang::interp::discard(), DiscardResult, clang::CXXNewExpr::getAllocatedType(), clang::CXXNewExpr::getArraySize(), clang::Type::getAsArrayTypeUnsafe(), clang::ArrayType::getElementType(), getFunction(), clang::CXXNewExpr::getInitializer(), clang::CXXNewExpr::getNumPlacementArgs(), clang::CXXNewExpr::getOperatorNew(), clang::CXXNewExpr::getPlacementArg(), clang::Expr::getType(), clang::QualType::getTypePtr(), clang::interp::Init(), clang::interp::Descriptor::InlineDescMD, clang::CXXNewExpr::isArray(), clang::Type::isArrayType(), clang::Type::isIncompleteArrayType(), clang::Type::isNothrowT(), P, clang::interp::PT_Ptr, SizeT, visit(), and visitInitializer().
bool Compiler::VisitCXXNoexceptExpr | ( | const CXXNoexceptExpr * | E | ) |
Definition at line 3182 of file Compiler.cpp.
References DiscardResult, clang::Expr::getType(), clang::CXXNoexceptExpr::getValue(), and clang::Type::isBooleanType().
bool Compiler::VisitCXXNullPtrLiteralExpr | ( | const CXXNullPtrLiteralExpr * | E | ) |
Definition at line 5359 of file Compiler.cpp.
References Ctx, DiscardResult, and clang::Expr::getType().
bool Compiler::VisitCXXParenListInitExpr | ( | const CXXParenListInitExpr * | E | ) |
Definition at line 2156 of file Compiler.cpp.
References clang::CXXParenListInitExpr::getArrayFiller(), clang::CXXParenListInitExpr::getInitExprs(), and visitInitList().
bool Compiler::VisitCXXReinterpretCastExpr | ( | const CXXReinterpretCastExpr * | E | ) |
Definition at line 3122 of file Compiler.cpp.
References classify(), delegate(), clang::CastExpr::getCastKind(), clang::Type::getPointeeType(), clang::CastExpr::getSubExpr(), clang::Expr::getType(), clang::QualType::getTypePtr(), clang::interp::isIntegralType(), clang::Type::isPointerOrReferenceType(), clang::interp::PT_Ptr, clang::interp::Reinterpret, and VisitCastExpr().
bool Compiler::VisitCXXRewrittenBinaryOperator | ( | const CXXRewrittenBinaryOperator * | E | ) |
Definition at line 3904 of file Compiler.cpp.
References delegate(), and clang::CXXRewrittenBinaryOperator::getSemanticForm().
bool Compiler::VisitCXXScalarValueInitExpr | ( | const CXXScalarValueInitExpr * | E | ) |
Definition at line 3402 of file Compiler.cpp.
References allocateLocal(), classify(), classifyPrim(), DiscardResult, clang::Type::getAs(), clang::Expr::getType(), Initializing, clang::Type::isVoidType(), and clang::T.
bool Compiler::VisitCXXStdInitializerListExpr | ( | const CXXStdInitializerListExpr * | E | ) |
Definition at line 4110 of file Compiler.cpp.
References classifyPrim(), Ctx, clang::interp::Record::Field::Decl, clang::interp::Record::getField(), getRecord(), clang::CXXStdInitializerListExpr::getSubExpr(), clang::Expr::getType(), clang::ValueDecl::getType(), Initializing, clang::Expr::isGLValue(), clang::interp::isIntegralType(), clang::interp::Record::Field::Offset, clang::interp::PT_Ptr, clang::interp::PT_Uint64, and visit().
bool Compiler::VisitCXXThisExpr | ( | const CXXThisExpr * | E | ) |
Definition at line 5380 of file Compiler.cpp.
References DiscardResult, emit(), InitStack, InitStackActive, clang::interp::InitLink::K_Elem, clang::interp::InitLink::K_Field, clang::interp::InitLink::K_InitList, and clang::interp::InitLink::K_This.
bool Compiler::VisitCXXThrowExpr | ( | const CXXThrowExpr * | E | ) |
Definition at line 3114 of file Compiler.cpp.
References clang::CXXThrowExpr::getSubExpr().
bool Compiler::visitCXXTryStmt | ( | const CXXTryStmt * | S | ) |
Definition at line 6082 of file Compiler.cpp.
References clang::CXXTryStmt::getTryBlock(), and visitStmt().
Referenced by visitStmt().
bool Compiler::VisitCXXTypeidExpr | ( | const CXXTypeidExpr * | E | ) |
Definition at line 3806 of file Compiler.cpp.
References Ctx, DiscardResult, clang::CXXTypeidExpr::getExprOperand(), clang::Expr::getType(), clang::CXXTypeidExpr::getTypeOperand(), clang::QualType::getTypePtr(), clang::Expr::isLValue(), clang::CXXTypeidExpr::isPotentiallyEvaluated(), clang::CXXTypeidExpr::isTypeOperand(), clang::T, and visit().
bool Compiler::VisitCXXUuidofExpr | ( | const CXXUuidofExpr * | E | ) |
Definition at line 3851 of file Compiler.cpp.
References DiscardResult, clang::MSGuidDecl::getAsAPValue(), clang::Type::getAsRecordDecl(), clang::CXXUuidofExpr::getGuidDecl(), getRecord(), clang::Expr::getType(), clang::ValueDecl::getType(), Initializing, clang::TagDecl::isCompleteDefinition(), clang::APValue::None, P, V, and visitAPValueInitializer().
|
protected |
Definition at line 4731 of file Compiler.cpp.
References clang::VarDecl::getInit(), clang::interp::InitializerFailed, clang::interp::GlobalInlineDescriptor::InitState, clang::interp::Block::invokeDtor(), P, clang::interp::Block::rawData(), clang::interp::Context::shouldBeGloballyIndexed(), and visitVarDecl().
Referenced by visitDeclRef().
|
overrideprotected |
Toplevel visitDeclAndReturn().
We get here from evaluateAsInitializer(). We need to evaluate the initializer and return its value.
Definition at line 4761 of file Compiler.cpp.
References classify(), clang::interp::LocalScope< Emitter >::destroyLocals(), clang::ValueDecl::getType(), clang::interp::Init(), clang::interp::InitializerFailed, clang::interp::GlobalInlineDescriptor::InitState, clang::interp::Block::invokeDtor(), Locals, P, clang::interp::PT_Ptr, clang::interp::Block::rawData(), clang::interp::Context::shouldBeGloballyIndexed(), clang::interp::OptPrimType::value_or(), visit(), and visitVarDecl().
|
protected |
Visit the given decl as if we have a reference to it.
Definition at line 6884 of file Compiler.cpp.
References clang::cast(), classify(), classifyPrim(), Ctx, DiscardResult, clang::VarDecl::evaluateValue(), clang::VarDecl::getAnyInitializer(), getFunction(), clang::VarDecl::getInit(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::VarDecl::hasConstantInitialization(), clang::VarDecl::hasGlobalStorage(), clang::interp::Init(), InitializingDecl, clang::QualType::isConstant(), clang::VarDecl::isInitCapture(), clang::Type::isIntegralOrEnumerationType(), clang::VarDecl::isLocalVarDecl(), clang::Type::isReferenceType(), clang::VarDecl::isStaticDataMember(), clang::Expr::isValueDependent(), clang::ValueDecl::isWeak(), Locals, P, clang::T, V, visit(), visitAPValue(), visitAPValueInitializer(), visitDecl(), and visitDeclRef().
Referenced by clang::interp::InitLink::emit(), visitAPValue(), visitDeclRef(), VisitDeclRefExpr(), and VisitMemberExpr().
bool Compiler::VisitDeclRefExpr | ( | const DeclRefExpr * | E | ) |
Definition at line 7048 of file Compiler.cpp.
References clang::DeclRefExpr::getDecl(), and visitDeclRef().
bool Compiler::visitDeclStmt | ( | const DeclStmt * | DS, |
bool | EvaluateConditionDecl = false ) |
Definition at line 5562 of file Compiler.cpp.
References clang::DeclStmt::decls(), clang::VarDecl::getInit(), clang::isa(), and visitVarDecl().
Referenced by visitCXXForRangeStmt(), visitForStmt(), visitIfStmt(), visitStmt(), visitSwitchStmt(), and visitWhileStmt().
bool Compiler::visitDefaultStmt | ( | const DefaultStmt * | S | ) |
Definition at line 6034 of file Compiler.cpp.
References clang::DefaultStmt::getSubStmt(), LabelInfoStack, and visitStmt().
Referenced by visitStmt().
Definition at line 5731 of file Compiler.cpp.
References clang::Cond, clang::interp::LocalScope< Emitter >::destroyLocals(), clang::DoStmt::getBody(), clang::DoStmt::getCond(), visitBool(), and visitStmt().
Referenced by visitStmt().
Definition at line 2184 of file Compiler.cpp.
References clang::EmbedExpr::begin(), and visit().
|
overrideprotected |
Definition at line 4678 of file Compiler.cpp.
References allocateLocal(), classify(), clang::interp::LocalScope< Emitter >::destroyLocals(), clang::Expr::getType(), clang::Type::isVoidType(), clang::T, clang::interp::InitLink::Temp(), visit(), and visitInitializer().
bool Compiler::VisitExpressionTraitExpr | ( | const ExpressionTraitExpr * | E | ) |
Definition at line 3845 of file Compiler.cpp.
References Ctx, and clang::ExpressionTraitExpr::getValue().
bool Compiler::VisitExprWithCleanups | ( | const ExprWithCleanups * | E | ) |
Definition at line 2882 of file Compiler.cpp.
References delegate(), clang::interp::LocalScope< Emitter >::destroyLocals(), and clang::FullExpr::getSubExpr().
bool Compiler::VisitExtVectorElementExpr | ( | const ExtVectorElementExpr * | E | ) |
Definition at line 4037 of file Compiler.cpp.
References allocateLocal(), allocateLocalPrimitive(), classifyPrim(), DiscardResult, clang::Type::getAs(), clang::ExtVectorElementExpr::getBase(), clang::VectorType::getElementType(), clang::ExtVectorElementExpr::getEncodedElementAccess(), clang::VectorType::getNumElements(), clang::PointerType::getPointeeType(), clang::Expr::getType(), Initializing, clang::Expr::isGLValue(), clang::Type::isVectorType(), clang::interp::PT_Ptr, clang::interp::PT_Uint32, and visit().
bool Compiler::VisitFixedPointBinOp | ( | const BinaryOperator * | E | ) |
Definition at line 1583 of file Compiler.cpp.
References classifyPrim(), Ctx, DiscardResult, clang::ASTContext::getFixedPointSemantics(), clang::BinaryOperator::getLHS(), clang::BinaryOperator::getOpcode(), clang::BinaryOperator::getRHS(), clang::Expr::getType(), clang::Type::isFixedPointType(), clang::interp::PT_Bool, clang::Result, clang::T, and visit().
Referenced by VisitBinaryOperator().
bool Compiler::VisitFixedPointLiteral | ( | const FixedPointLiteral * | E | ) |
Definition at line 823 of file Compiler.cpp.
References classifyPrim(), Ctx, DiscardResult, clang::Expr::getType(), clang::FixedPointLiteral::getValue(), clang::Type::isFixedPointType(), and clang::interp::PT_FixedPoint.
bool Compiler::VisitFixedPointUnaryOperator | ( | const UnaryOperator * | E | ) |
Definition at line 1668 of file Compiler.cpp.
References delegate(), clang::UnaryOperator::getOpcode(), clang::UnaryOperator::getSubExpr(), clang::Expr::getType(), clang::Type::isFixedPointType(), and visit().
Referenced by VisitUnaryOperator().
bool Compiler::VisitFloatCompoundAssignOperator | ( | const CompoundAssignOperator * | E | ) |
Definition at line 2650 of file Compiler.cpp.
References allocateLocalPrimitive(), classify(), classifyPrim(), DiscardResult, clang::CompoundAssignOperator::getComputationLHSType(), clang::CompoundAssignOperator::getComputationResultType(), clang::BinaryOperator::getLHS(), clang::BinaryOperator::getOpcode(), clang::BinaryOperator::getRHS(), clang::Expr::getType(), clang::Type::isFloatingType(), clang::interp::LT(), and visit().
Referenced by VisitCompoundAssignOperator().
bool Compiler::VisitFloatingLiteral | ( | const FloatingLiteral * | E | ) |
Definition at line 790 of file Compiler.cpp.
References DiscardResult, and clang::FloatingLiteral::getValue().
Definition at line 5765 of file Compiler.cpp.
References clang::Cond, clang::interp::LocalScope< Emitter >::destroyLocals(), clang::interp::discard(), clang::ForStmt::getBody(), clang::ForStmt::getCond(), clang::ForStmt::getConditionVariable(), clang::ForStmt::getConditionVariableDeclStmt(), clang::ForStmt::getInc(), clang::ForStmt::getInit(), clang::interp::Inc(), clang::interp::Init(), visitBool(), visitDeclStmt(), and visitStmt().
Referenced by visitStmt().
|
overrideprotected |
Definition at line 6407 of file Compiler.cpp.
References classify(), CompilingFunction, clang::FunctionDecl::getBody(), clang::CXXMethodDecl::getParent(), clang::FunctionDecl::getReturnType(), clang::CXXMethodDecl::isCopyAssignmentOperator(), clang::CXXMethodDecl::isLambdaStaticInvoker(), clang::CXXMethodDecl::isMoveAssignmentOperator(), clang::TagDecl::isUnion(), clang::Type::isVoidType(), ReturnType, and visitStmt().
bool Compiler::VisitGenericSelectionExpr | ( | const GenericSelectionExpr * | E | ) |
Definition at line 3466 of file Compiler.cpp.
References delegate(), and clang::GenericSelectionExpr::getResultExpr().
bool Compiler::VisitGNUNullExpr | ( | const GNUNullExpr * | E | ) |
Definition at line 5369 of file Compiler.cpp.
References classifyPrim(), DiscardResult, clang::Expr::getType(), clang::Type::isIntegerType(), and clang::T.
Definition at line 5621 of file Compiler.cpp.
References clang::interp::LocalScope< Emitter >::destroyLocals(), clang::interp::getBoolValue(), clang::IfStmt::getCond(), clang::IfStmt::getConditionVariable(), clang::IfStmt::getConditionVariableDeclStmt(), clang::IfStmt::getElse(), clang::IfStmt::getInit(), clang::IfStmt::getThen(), clang::IfStmt::isNegatedConsteval(), clang::IfStmt::isNonNegatedConsteval(), visitBool(), visitDeclStmt(), and visitStmt().
Referenced by visitStmt().
bool Compiler::VisitImaginaryLiteral | ( | const ImaginaryLiteral * | E | ) |
Definition at line 799 of file Compiler.cpp.
References allocateTemporary(), classifyPrim(), DiscardResult, clang::ImaginaryLiteral::getSubExpr(), clang::Expr::getType(), Initializing, clang::Type::isAnyComplexType(), and visitArrayElemInit().
bool Compiler::VisitImplicitValueInitExpr | ( | const ImplicitValueInitExpr * | E | ) |
Definition at line 1687 of file Compiler.cpp.
References classify(), classifyPrim(), clang::Type::getAs(), clang::Type::getAsRecordDecl(), getRecord(), clang::Expr::getType(), Initializing, clang::Type::isArrayType(), clang::Type::isIncompleteArrayType(), clang::Decl::isInvalidDecl(), clang::Type::isRecordType(), and clang::T.
Compiles an initializer.
This is like visit() but it will never create a variable and instead rely on a variable already having been created. visitInitializer() then relies on a pointer to this variable being on top of the stack.
Definition at line 4235 of file Compiler.cpp.
References canClassify(), clang::Expr::getType(), and clang::StmtVisitorBase< llvm::make_const_ptr, Compiler< Emitter >, bool, ParamTys... >::Visit().
Referenced by visit(), visitArrayElemInit(), visitCallArgs(), VisitCompoundLiteralExpr(), VisitCXXConstructExpr(), VisitCXXNewExpr(), visitExpr(), visitInitList(), VisitLambdaExpr(), VisitMaterializeTemporaryExpr(), VisitOpaqueValueExpr(), visitReturnStmt(), and visitVarDecl().
|
protected |
Definition at line 1800 of file Compiler.cpp.
References clang::interp::Activate(), clang::cast(), classify(), classifyPrim(), Ctx, delegate(), clang::interp::discard(), DiscardResult, clang::interp::InitLink::Field(), clang::Type::getAs(), clang::interp::Record::getBase(), clang::ArrayType::getElementType(), clang::interp::Record::getField(), getRecord(), clang::Expr::getType(), clang::APIntStorage::getValue(), clang::ConstantArrayType::getZExtSize(), clang::interp::Init(), clang::interp::InitLink::InitList(), clang::isa(), clang::Type::isArrayType(), clang::Type::isRecordType(), clang::interp::Record::isUnion(), clang::interp::Record::Field::isUnnamedBitField(), clang::Type::isVoidType(), clang::interp::PT_Float, clang::T, visit(), visitArrayElemInit(), and visitInitializer().
Referenced by VisitCXXParenListInitExpr(), and VisitInitListExpr().
bool Compiler::VisitInitListExpr | ( | const InitListExpr * | E | ) |
Definition at line 2151 of file Compiler.cpp.
References clang::InitListExpr::getArrayFiller(), clang::InitListExpr::inits(), and visitInitList().
bool Compiler::VisitIntegerLiteral | ( | const IntegerLiteral * | E | ) |
Definition at line 782 of file Compiler.cpp.
References DiscardResult, and clang::interp::LE().
bool Compiler::VisitLambdaExpr | ( | const LambdaExpr * | E | ) |
Definition at line 3061 of file Compiler.cpp.
References clang::LambdaExpr::capture_init_begin(), classify(), DiscardResult, clang::interp::Record::fields(), clang::LambdaExpr::getLambdaClass(), clang::interp::Init(), Initializing, P, clang::T, visit(), and visitInitializer().
bool Compiler::VisitLogicalBinOp | ( | const BinaryOperator * | E | ) |
Definition at line 1082 of file Compiler.cpp.
References classify(), DiscardResult, clang::BinaryOperator::getLHS(), clang::BinaryOperator::getOpcode(), clang::BinaryOperator::getRHS(), clang::Expr::getType(), clang::BinaryOperator::isLogicalOp(), clang::interp::PT_Bool, clang::T, and visitBool().
Referenced by VisitBinaryOperator().
bool Compiler::VisitMaterializeTemporaryExpr | ( | const MaterializeTemporaryExpr * | E | ) |
Definition at line 2890 of file Compiler.cpp.
References allocateLocal(), allocateLocalPrimitive(), classify(), delegate(), clang::interp::discard(), DiscardResult, clang::MaterializeTemporaryExpr::getExtendingDecl(), clang::MaterializeTemporaryExpr::getLifetimeExtendedTemporaryDecl(), clang::MaterializeTemporaryExpr::getStorageDuration(), clang::MaterializeTemporaryExpr::getSubExpr(), clang::Expr::getType(), Initializing, clang::QualType::isConstQualified(), clang::QualType::isVolatileQualified(), P, clang::SD_Static, clang::Expr::skipRValueSubobjectAdjustments(), clang::interp::InitLink::Temp(), visit(), and visitInitializer().
bool Compiler::VisitMemberExpr | ( | const MemberExpr * | E | ) |
Definition at line 2353 of file Compiler.cpp.
References clang::cast(), classify(), clang::interp::discard(), DiscardResult, clang::MemberExpr::getBase(), clang::interp::Record::getField(), clang::MemberExpr::getMemberDecl(), clang::DeclContext::getParent(), getRecord(), clang::isa(), clang::Expr::isGLValue(), clang::Member, P, clang::interp::PT_Ptr, clang::T, visit(), and visitDeclRef().
bool Compiler::VisitObjCBoolLiteralExpr | ( | const ObjCBoolLiteralExpr * | E | ) |
Definition at line 3477 of file Compiler.cpp.
References DiscardResult, and clang::ObjCBoolLiteralExpr::getValue().
bool Compiler::VisitObjCBoxedExpr | ( | const ObjCBoxedExpr * | E | ) |
Definition at line 4097 of file Compiler.cpp.
References classifyPrim(), clang::interp::discard(), DiscardResult, clang::ObjCBoxedExpr::getSubExpr(), clang::ObjCBoxedExpr::isExpressibleAsConstantInitializer(), and clang::interp::PT_Ptr.
bool Compiler::VisitObjCEncodeExpr | ( | const ObjCEncodeExpr * | E | ) |
Definition at line 2608 of file Compiler.cpp.
References clang::StringLiteral::Create(), Ctx, delegate(), clang::ObjCEncodeExpr::getAtLoc(), clang::ObjCEncodeExpr::getEncodedType(), clang::Expr::getType(), and clang::Ordinary.
bool Compiler::VisitObjCStringLiteral | ( | const ObjCStringLiteral * | E | ) |
Definition at line 2601 of file Compiler.cpp.
References DiscardResult.
bool Compiler::VisitOffsetOfExpr | ( | const OffsetOfExpr * | E | ) |
Definition at line 3367 of file Compiler.cpp.
References clang::OffsetOfNode::Array, classifyPrim(), clang::interp::discard(), DiscardResult, clang::OffsetOfNode::getArrayExprIndex(), clang::OffsetOfExpr::getComponent(), clang::OffsetOfExpr::getIndexExpr(), clang::OffsetOfNode::getKind(), clang::OffsetOfExpr::getNumComponents(), clang::Expr::getType(), clang::interp::PT_Sint64, clang::T, and visit().
bool Compiler::VisitOpaqueValueExpr | ( | const OpaqueValueExpr * | E | ) |
Definition at line 2444 of file Compiler.cpp.
References allocateLocalPrimitive(), classify(), DiscardResult, clang::OpaqueValueExpr::getSourceExpr(), Initializing, OpaqueExprs, clang::interp::PT_Ptr, visit(), and visitInitializer().
bool Compiler::VisitPackIndexingExpr | ( | const PackIndexingExpr * | E | ) |
Definition at line 3934 of file Compiler.cpp.
References delegate(), and clang::PackIndexingExpr::getSelectedExpr().
Definition at line 836 of file Compiler.cpp.
References delegate(), and clang::ParenExpr::getSubExpr().
bool Compiler::VisitPointerArithBinOp | ( | const BinaryOperator * | E | ) |
Perform addition/subtraction of a pointer and an integer or subtraction of two pointers.
Definition at line 1004 of file Compiler.cpp.
References classify(), classifyPrim(), DiscardResult, clang::BinaryOperator::getLHS(), clang::BinaryOperator::getOpcode(), clang::BinaryOperator::getRHS(), clang::Expr::getType(), clang::Type::isIntegerType(), clang::Type::isPointerType(), clang::interp::LT(), clang::interp::PT_Ptr, clang::T, and visit().
Referenced by VisitBinaryOperator().
bool Compiler::VisitPointerCompoundAssignOperator | ( | const CompoundAssignOperator * | E | ) |
Definition at line 2723 of file Compiler.cpp.
References classify(), DiscardResult, clang::BinaryOperator::getLHS(), clang::BinaryOperator::getOpcode(), clang::BinaryOperator::getRHS(), clang::Expr::getType(), clang::interp::LT(), and visit().
Referenced by VisitCompoundAssignOperator().
bool Compiler::VisitPredefinedExpr | ( | const PredefinedExpr * | E | ) |
Definition at line 3101 of file Compiler.cpp.
References delegate(), DiscardResult, clang::PredefinedExpr::getFunctionName(), Initializing, and P.
bool Compiler::VisitPseudoObjectExpr | ( | const PseudoObjectExpr * | E | ) |
Definition at line 3910 of file Compiler.cpp.
References delegate(), clang::interp::discard(), clang::PseudoObjectExpr::getResultExpr(), and clang::PseudoObjectExpr::semantics().
bool Compiler::VisitRecoveryExpr | ( | const RecoveryExpr * | E | ) |
Definition at line 3939 of file Compiler.cpp.
bool Compiler::VisitRequiresExpr | ( | const RequiresExpr * | E | ) |
Definition at line 3885 of file Compiler.cpp.
References classifyPrim(), DiscardResult, clang::Expr::getType(), clang::RequiresExpr::isSatisfied(), clang::Expr::isValueDependent(), and clang::interp::PT_Bool.
bool Compiler::visitReturnStmt | ( | const ReturnStmt * | RS | ) |
Definition at line 5584 of file Compiler.cpp.
References emitCleanup(), clang::ReturnStmt::getRetValue(), InStmtExpr, ReturnType, clang::interp::InitLink::RVO(), visit(), and visitInitializer().
Referenced by visitStmt().
bool Compiler::VisitShuffleVectorExpr | ( | const ShuffleVectorExpr * | E | ) |
Definition at line 3990 of file Compiler.cpp.
References allocateLocalPrimitive(), clang::Type::castAs(), classifyPrim(), clang::VectorType::getElementType(), clang::ShuffleVectorExpr::getExpr(), clang::VectorType::getNumElements(), clang::ShuffleVectorExpr::getNumSubExprs(), clang::ShuffleVectorExpr::getShuffleMaskIdx(), clang::Expr::getType(), Initializing, clang::interp::PT_Ptr, and visit().
bool Compiler::VisitSizeOfPackExpr | ( | const SizeOfPackExpr * | E | ) |
Definition at line 3461 of file Compiler.cpp.
References clang::SizeOfPackExpr::getPackLength().
bool Compiler::VisitSourceLocExpr | ( | const SourceLocExpr * | E | ) |
Definition at line 3311 of file Compiler.cpp.
References clang::cast(), classifyPrim(), Ctx, DiscardResult, clang::SourceLocExpr::EvaluateInContext(), clang::interp::Record::getField(), clang::APValue::getInt(), clang::APValue::getLValueBase(), clang::APValue::getLValuePath(), clang::interp::Record::getNumFields(), getRecord(), clang::Expr::getType(), clang::APValue::isInt(), clang::Type::isIntegerType(), clang::APValue::isLValue(), clang::Type::isPointerType(), P, SourceLocDefaultExpr, V, visit(), and visitAPValue().
Definition at line 5445 of file Compiler.cpp.
References clang::cast(), clang::interp::discard(), clang::Stmt::getStmtClass(), visitAttributedStmt(), visitBreakStmt(), visitCaseStmt(), visitCompoundStmt(), visitContinueStmt(), visitCXXForRangeStmt(), visitCXXTryStmt(), visitDeclStmt(), visitDefaultStmt(), visitDoStmt(), visitForStmt(), visitIfStmt(), visitReturnStmt(), visitStmt(), visitSwitchStmt(), and visitWhileStmt().
Referenced by visitAttributedStmt(), visitCaseStmt(), visitCompoundStmt(), visitCXXForRangeStmt(), visitCXXTryStmt(), visitDefaultStmt(), visitDoStmt(), visitForStmt(), visitFunc(), visitIfStmt(), visitStmt(), VisitStmtExpr(), visitSwitchStmt(), and visitWhileStmt().
Definition at line 4148 of file Compiler.cpp.
References clang::CompoundStmt::body(), delegate(), clang::interp::LocalScope< Emitter >::destroyLocals(), clang::CompoundStmt::getStmtExprResult(), clang::StmtExpr::getSubStmt(), clang::Result, and visitStmt().
bool Compiler::VisitStringLiteral | ( | const StringLiteral * | E | ) |
Definition at line 2544 of file Compiler.cpp.
References Ctx, DiscardResult, clang::StringLiteral::getCharByteWidth(), clang::StringLiteral::getCodeUnit(), clang::StringLiteral::getLength(), clang::Expr::getType(), clang::ConstantArrayType::getZExtSize(), Initializing, and P.
bool Compiler::VisitSubstNonTypeTemplateParmExpr | ( | const SubstNonTypeTemplateParmExpr * | E | ) |
Definition at line 2162 of file Compiler.cpp.
References delegate(), and clang::SubstNonTypeTemplateParmExpr::getReplacement().
bool Compiler::visitSwitchStmt | ( | const SwitchStmt * | S | ) |
Definition at line 5948 of file Compiler.cpp.
References allocateLocalPrimitive(), CaseLabels, classifyPrim(), clang::Cond, clang::interp::LocalScope< Emitter >::destroyLocals(), clang::SwitchStmt::getBody(), clang::SwitchStmt::getCond(), clang::SwitchStmt::getConditionVariable(), clang::SwitchStmt::getConditionVariableDeclStmt(), clang::SwitchStmt::getInit(), clang::SwitchCase::getNextSwitchCase(), clang::SwitchStmt::getSwitchCaseList(), clang::Value::getType(), visit(), visitDeclStmt(), and visitStmt().
Referenced by visitStmt().
bool Compiler::VisitSYCLUniqueStableNameExpr | ( | const SYCLUniqueStableNameExpr * | E | ) |
Definition at line 2619 of file Compiler.cpp.
References clang::SYCLUniqueStableNameExpr::ComputeName(), clang::StringLiteral::Create(), Ctx, DiscardResult, clang::SYCLUniqueStableNameExpr::getLocation(), Initializing, clang::Normal, clang::Ordinary, P, and clang::QualType::withConst().
bool Compiler::VisitTypeTraitExpr | ( | const TypeTraitExpr * | E | ) |
Definition at line 3041 of file Compiler.cpp.
References classifyPrim(), DiscardResult, clang::TypeTraitExpr::getAPValue(), clang::TypeTraitExpr::getBoolValue(), clang::Expr::getType(), clang::Type::isBooleanType(), clang::TypeTraitExpr::isStoredAsBoolean(), clang::T, and visitAPValue().
bool Compiler::VisitUnaryExprOrTypeTraitExpr | ( | const UnaryExprOrTypeTraitExpr * | E | ) |
Definition at line 2213 of file Compiler.cpp.
References AlignOfType(), Ctx, DiscardResult, clang::UnaryExprOrTypeTraitExpr::getArgumentExpr(), clang::UnaryExprOrTypeTraitExpr::getArgumentType(), clang::Type::getAs(), clang::Type::getAsArrayTypeUnsafe(), clang::ASTContext::getAsVariableArrayType(), clang::ASTContext::getDeclAlign(), clang::UnaryExprOrTypeTraitExpr::getKind(), clang::ASTContext::getOpenMPDefaultSimdAlign(), clang::CharUnits::getQuantity(), clang::Expr::getType(), clang::ASTContext::getTypeInfoDataSizeInChars(), clang::UnaryExprOrTypeTraitExpr::getTypeOfArgument(), clang::ASTContext::getTypeSizeInChars(), clang::Expr::IgnoreParens(), clang::UnaryExprOrTypeTraitExpr::isArgumentType(), clang::Type::isArrayType(), clang::Type::isConstantSizeType(), clang::Type::isDependentType(), clang::Type::isSizelessVectorType(), clang::CharUnits::One(), clang::ASTContext::toCharUnitsFromBits(), and clang::TypeInfoChars::Width.
bool Compiler::VisitUnaryOperator | ( | const UnaryOperator * | E | ) |
Definition at line 6442 of file Compiler.cpp.
References clang::UnaryOperator::canOverflow(), clang::cast(), classify(), classifyPrim(), Ctx, delegate(), clang::interp::discard(), DiscardResult, clang::UnaryOperator::getOpcode(), clang::UnaryOperator::getSubExpr(), clang::Expr::getType(), clang::Type::isAnyComplexType(), clang::Type::isFixedPointType(), clang::Expr::isGLValue(), clang::interp::isIntegralType(), clang::Type::isMemberPointerType(), clang::Type::isVectorType(), clang::interp::PT_Bool, clang::interp::PT_Float, clang::interp::PT_Ptr, clang::T, visit(), visitBool(), VisitComplexUnaryOperator(), VisitFixedPointUnaryOperator(), and VisitVectorUnaryOperator().
|
protected |
Creates and initializes a variable from the given decl.
Definition at line 4822 of file Compiler.cpp.
References allocateLocal(), allocateLocalPrimitive(), clang::interp::Block, classify(), clang::interp::InitLink::Decl(), clang::ValueDecl::getType(), clang::interp::Init(), clang::QualType::isConstQualified(), clang::VarDecl::isLocalVarDecl(), clang::QualType::isNull(), clang::VarDecl::isStaticLocal(), clang::QualType::isVolatileQualified(), clang::interp::VarCreationState::NotCreated(), P, clang::interp::Context::shouldBeGloballyIndexed(), visit(), and visitInitializer().
Referenced by visitDecl(), visitDeclAndReturn(), and visitDeclStmt().
bool Compiler::VisitVectorBinOp | ( | const BinaryOperator * | E | ) |
Definition at line 1371 of file Compiler.cpp.
References clang::interp::Add(), allocateLocalPrimitive(), allocateTemporary(), canClassify(), clang::Type::castAs(), classifyPrim(), Ctx, DiscardResult, clang::interp::Div(), EMIT_ARITH_OP, clang::Type::getAs(), clang::VectorType::getElementType(), clang::BinaryOperator::getLHS(), clang::BinaryOperator::getOpcode(), clang::BinaryOperator::getOpForCompoundAssignment(), clang::BinaryOperator::getRHS(), clang::Expr::getType(), Initializing, clang::BinaryOperator::isAssignmentOp(), clang::BinaryOperator::isBitwiseOp(), clang::BinaryOperator::isCommaOp(), clang::BinaryOperator::isComparisonOp(), clang::BinaryOperator::isCompoundAssignmentOp(), clang::BinaryOperator::isLogicalOp(), clang::BinaryOperator::isShiftOp(), clang::Type::isVectorType(), clang::interp::Mul(), clang::interp::PT_Bool, clang::interp::PT_Ptr, clang::interp::Sub(), and visit().
Referenced by VisitBinaryOperator(), and VisitCompoundAssignOperator().
bool Compiler::VisitVectorUnaryOperator | ( | const UnaryOperator * | E | ) |
Definition at line 6777 of file Compiler.cpp.
References allocateLocal(), allocateLocalPrimitive(), classifyPrim(), Ctx, delegate(), clang::interp::discard(), DiscardResult, clang::Type::getAs(), clang::VectorType::getElementType(), clang::UnaryOperator::getOpcode(), clang::UnaryOperator::getSubExpr(), clang::Expr::getType(), Initializing, clang::Type::isVectorType(), clang::interp::PT_Bool, clang::interp::PT_Ptr, and visit().
Referenced by VisitUnaryOperator().
Definition at line 5691 of file Compiler.cpp.
References clang::Cond, clang::interp::LocalScope< Emitter >::destroyLocals(), clang::WhileStmt::getBody(), clang::WhileStmt::getCond(), clang::WhileStmt::getConditionVariable(), clang::WhileStmt::getConditionVariableDeclStmt(), visitBool(), visitDeclStmt(), and visitStmt().
Referenced by visitStmt().
|
friend |
Definition at line 340 of file Compiler.h.
Definition at line 340 of file Compiler.h.
|
friend |
Definition at line 340 of file Compiler.h.
Definition at line 352 of file Compiler.h.
References InitLink, and clang::T.
Referenced by InitLink.
|
friend |
Definition at line 340 of file Compiler.h.
|
friend |
Definition at line 340 of file Compiler.h.
|
friend |
Definition at line 352 of file Compiler.h.
|
friend |
Definition at line 340 of file Compiler.h.
|
friend |
Definition at line 352 of file Compiler.h.
Definition at line 352 of file Compiler.h.
|
friend |
Definition at line 340 of file Compiler.h.
|
friend |
Definition at line 340 of file Compiler.h.
|
friend |
Definition at line 352 of file Compiler.h.
|
friend |
Definition at line 352 of file Compiler.h.
|
friend |
Definition at line 340 of file Compiler.h.
|
protected |
Current argument index. Needed to emit ArrayInitIndexExpr.
Definition at line 439 of file Compiler.h.
Referenced by VisitArrayInitIndexExpr().
|
protected |
Switch case mapping.
Definition at line 462 of file Compiler.h.
Referenced by visitCaseStmt(), and visitSwitchStmt().
|
protected |
Definition at line 466 of file Compiler.h.
Referenced by VisitCallExpr(), and visitFunc().
|
protected |
Current compilation context.
Definition at line 133 of file Compiler.h.
Referenced by canClassify(), canClassify(), classify(), classify(), Compiler(), getFunction(), visitAttributedStmt(), VisitBinaryOperator(), VisitBlockExpr(), VisitCallExpr(), VisitCastExpr(), VisitCompoundAssignOperator(), VisitConvertVectorExpr(), VisitCXXConstructExpr(), VisitCXXDynamicCastExpr(), VisitCXXNewExpr(), VisitCXXNullPtrLiteralExpr(), VisitCXXStdInitializerListExpr(), VisitCXXTypeidExpr(), visitDeclRef(), VisitExpressionTraitExpr(), VisitFixedPointBinOp(), VisitFixedPointLiteral(), visitInitList(), VisitObjCEncodeExpr(), VisitSourceLocExpr(), VisitStringLiteral(), VisitSYCLUniqueStableNameExpr(), VisitUnaryExprOrTypeTraitExpr(), VisitUnaryOperator(), VisitVectorBinOp(), and VisitVectorUnaryOperator().
|
protected |
Flag indicating if return value is to be discarded.
Definition at line 445 of file Compiler.h.
Referenced by visitAPValue(), VisitArrayInitLoopExpr(), VisitArraySubscriptExpr(), VisitArrayTypeTraitExpr(), VisitBinaryOperator(), VisitBlockExpr(), VisitBuiltinCallExpr(), VisitCallExpr(), VisitCastExpr(), VisitCharacterLiteral(), VisitComplexBinOp(), VisitComplexUnaryOperator(), VisitCompoundAssignOperator(), VisitCompoundLiteralExpr(), VisitConceptSpecializationExpr(), VisitConstantExpr(), VisitCXXBindTemporaryExpr(), VisitCXXBoolLiteralExpr(), VisitCXXConstructExpr(), VisitCXXNewExpr(), VisitCXXNoexceptExpr(), VisitCXXNullPtrLiteralExpr(), VisitCXXScalarValueInitExpr(), VisitCXXThisExpr(), VisitCXXTypeidExpr(), VisitCXXUuidofExpr(), visitDeclRef(), VisitExtVectorElementExpr(), VisitFixedPointBinOp(), VisitFixedPointLiteral(), VisitFloatCompoundAssignOperator(), VisitFloatingLiteral(), VisitGNUNullExpr(), VisitImaginaryLiteral(), visitInitList(), VisitIntegerLiteral(), VisitLambdaExpr(), VisitLogicalBinOp(), VisitMaterializeTemporaryExpr(), VisitMemberExpr(), VisitObjCBoolLiteralExpr(), VisitObjCBoxedExpr(), VisitObjCStringLiteral(), VisitOffsetOfExpr(), VisitOpaqueValueExpr(), VisitPointerArithBinOp(), VisitPointerCompoundAssignOperator(), VisitPredefinedExpr(), VisitRequiresExpr(), VisitSourceLocExpr(), VisitStringLiteral(), VisitSYCLUniqueStableNameExpr(), VisitTypeTraitExpr(), VisitUnaryExprOrTypeTraitExpr(), VisitUnaryOperator(), VisitVectorBinOp(), and VisitVectorUnaryOperator().
|
protected |
Flag inidicating if we're initializing an already created variable.
This is set in visitInitializer().
Definition at line 452 of file Compiler.h.
Referenced by VisitArrayInitLoopExpr(), VisitBinaryOperator(), VisitBuiltinCallExpr(), VisitCallExpr(), VisitCastExpr(), VisitComplexBinOp(), VisitComplexUnaryOperator(), VisitCompoundLiteralExpr(), VisitConvertVectorExpr(), VisitCXXBindTemporaryExpr(), VisitCXXConstructExpr(), VisitCXXScalarValueInitExpr(), VisitCXXStdInitializerListExpr(), VisitCXXUuidofExpr(), VisitExtVectorElementExpr(), VisitImaginaryLiteral(), VisitImplicitValueInitExpr(), VisitLambdaExpr(), VisitMaterializeTemporaryExpr(), VisitOpaqueValueExpr(), VisitPredefinedExpr(), VisitShuffleVectorExpr(), VisitStringLiteral(), VisitSYCLUniqueStableNameExpr(), VisitVectorBinOp(), and VisitVectorUnaryOperator().
|
protected |
Definition at line 453 of file Compiler.h.
Referenced by visitDeclRef().
|
protected |
Definition at line 455 of file Compiler.h.
Referenced by VisitCXXThisExpr().
|
protected |
Definition at line 456 of file Compiler.h.
Referenced by VisitCXXThisExpr().
|
protected |
Definition at line 447 of file Compiler.h.
Referenced by visitReturnStmt().
|
protected |
Stack of label information for loops and switch statements.
Definition at line 464 of file Compiler.h.
Referenced by visitBreakStmt(), visitContinueStmt(), and visitDefaultStmt().
|
protected |
Variable to storage mapping.
Definition at line 430 of file Compiler.h.
Referenced by allocateLocal(), allocateLocalPrimitive(), VisitCastExpr(), visitDeclAndReturn(), and visitDeclRef().
|
protected |
OpaqueValueExpr to location mapping.
Definition at line 433 of file Compiler.h.
Referenced by VisitOpaqueValueExpr().
|
protected |
Program to link to.
Definition at line 135 of file Compiler.h.
Referenced by allocateLocal(), allocateLocalPrimitive(), allocateTemporary(), Compiler(), getRecord(), VisitCastExpr(), VisitCompoundLiteralExpr(), VisitCXXNewExpr(), VisitCXXUuidofExpr(), visitDecl(), visitDeclAndReturn(), visitDeclRef(), VisitLambdaExpr(), VisitMaterializeTemporaryExpr(), VisitMemberExpr(), VisitPredefinedExpr(), VisitSourceLocExpr(), VisitStringLiteral(), VisitSYCLUniqueStableNameExpr(), and visitVarDecl().
|
protected |
Type of the expression returned by the function.
Definition at line 459 of file Compiler.h.
Referenced by VisitBuiltinCallExpr(), VisitCallExpr(), visitFunc(), and visitReturnStmt().
|
protected |
DefaultInit- or DefaultArgExpr, needed for SourceLocExpr.
Definition at line 442 of file Compiler.h.
Referenced by VisitSourceLocExpr().
|
protected |
Definition at line 448 of file Compiler.h.
Referenced by visit(), and VisitCastExpr().
|
protected |
Current scope.
Definition at line 436 of file Compiler.h.
Referenced by allocateLocal(), allocateLocalPrimitive(), allocateTemporary(), emitCleanup(), visitBreakStmt(), visitCallArgs(), and visitContinueStmt().