|
clang 23.0.0git
|
Compilation context for expressions. More...
#include "/work/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(). | |
| bool | 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 | visitInitializerPop (const Expr *E) |
| Similar, but will also pop the pointer. | |
| 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) |
| Creates and initializes a variable from the given decl. | |
| VarCreationState | visitDecl (const VarDecl *VD) |
| 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, ScopeKind SC=ScopeKind::Block) |
| Creates a local primitive value. | |
| UnsignedOrNone | allocateLocal (DeclTy &&Decl, QualType Ty=QualType(), ScopeKind=ScopeKind::Block) |
| 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 | VariablesAreConstexprUnknown = 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 111 of file Compiler.h.
|
protected |
Definition at line 116 of file Compiler.h.
|
protected |
Definition at line 118 of file Compiler.h.
|
protected |
Definition at line 115 of file Compiler.h.
|
protected |
Definition at line 117 of file Compiler.h.
|
inline |
Initializes the compiler and the backend emitter.
Definition at line 142 of file Compiler.h.
|
protected |
Allocates a space storing a local given its type.
Definition at line 5036 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(), clang::QualType::isVolatileQualified(), Locals, P, VariablesAreConstexprUnknown, and VarScope.
Referenced by visit(), VisitBinaryOperator(), VisitBuiltinCallExpr(), visitCallArgs(), VisitCallExpr(), VisitCastExpr(), VisitComplexUnaryOperator(), VisitCompoundLiteralExpr(), VisitCXXConstructExpr(), VisitCXXScalarValueInitExpr(), visitExpr(), VisitExtVectorElementExpr(), VisitMaterializeTemporaryExpr(), VisitShuffleVectorExpr(), visitVarDecl(), and VisitVectorUnaryOperator().
|
protected |
Creates a local primitive value.
Definition at line 5017 of file Compiler.cpp.
References clang::interp::Descriptor::InlineDescMD, clang::isa(), clang::interp::Descriptor::IsConstexprUnknown, Locals, P, VariablesAreConstexprUnknown, 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 5069 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 278 of file Compiler.h.
References Ctx.
Referenced by visit(), visitCallArgs(), VisitCastExpr(), VisitCXXConstructExpr(), visitInitializer(), visitInitializerPop(), and VisitVectorBinOp().
|
inlineprotected |
Definition at line 279 of file Compiler.h.
References Ctx.
|
inlineprotected |
Definition at line 276 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 277 of file Compiler.h.
References Ctx.
|
inlineprotected |
Classifies a known primitive expression.
Definition at line 289 of file Compiler.h.
References classify().
|
inlineprotected |
Classifies a known primitive type.
Definition at line 282 of file Compiler.h.
References classify().
Referenced by 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(), visitVarDecl(), VisitVectorBinOp(), and VisitVectorUnaryOperator().
Just pass evaluation on to E.
This leaves all the parsing flags intact.
Definition at line 4604 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 4598 of file Compiler.cpp.
References clang::StmtVisitorBase< llvm::make_const_ptr, Compiler< Emitter >, bool, ParamTys... >::Visit().
Emits scope cleanup instructions.
Definition at line 7745 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 5110 of file Compiler.cpp.
References Ctx.
Referenced by VisitCallExpr(), VisitCXXConstructExpr(), VisitCXXInheritedCtorInitExpr(), VisitCXXNewExpr(), and visitDeclRef().
|
protected |
Definition at line 5105 of file Compiler.cpp.
References P.
Returns a record from a record or pointer type.
Definition at line 5098 of file Compiler.cpp.
References getRecord(), and getRecordTy().
Referenced by getRecord(), visitAPValue(), visitAPValueInitializer(), VisitCastExpr(), VisitCXXConstructExpr(), VisitCXXStdInitializerListExpr(), VisitCXXUuidofExpr(), VisitImplicitValueInitExpr(), visitInitList(), VisitMemberExpr(), and VisitSourceLocExpr().
Returns a record type from a record or pointer type.
Definition at line 5092 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 4636 of file Compiler.cpp.
References allocateLocal(), canClassify(), clang::interp::discard(), clang::interp::FullExpression, 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(), VisitArrayInitLoopExpr(), 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 2799 of file Compiler.cpp.
References clang::Condition, delegate(), clang::interp::discard(), clang::interp::getBoolValue(), clang::AbstractConditionalOperator::getCond(), clang::AbstractConditionalOperator::getFalseExpr(), clang::AbstractConditionalOperator::getTrueExpr(), VarScope, and visitBool().
| bool Compiler::VisitAddrLabelExpr | ( | const AddrLabelExpr * | E | ) |
Definition at line 4360 of file Compiler.cpp.
References DiscardResult, clang::Expr::getType(), and clang::Type::isVoidPointerType().
|
protected |
Visit an APValue.
Definition at line 5355 of file Compiler.cpp.
References clang::cast(), Ctx, DiscardResult, clang::Type::getAsArrayTypeUnsafe(), clang::interp::Record::getBase(), clang::ArrayType::getElementType(), clang::interp::Record::getField(), clang::APValue::getFloat(), clang::APValue::getInt(), clang::APValue::getLValueBase(), clang::APValue::getLValuePath(), clang::APValue::getMemberPointerDecl(), clang::APValue::getMemberPointerPath(), getRecord(), clang::Type::isArrayType(), clang::APValue::isFloat(), clang::APValue::isInt(), clang::APValue::isLValue(), clang::APValue::isMemberPointer(), clang::APValue::isMemberPointerToDerivedMember(), clang::APValue::isNullPointer(), clang::Type::isRecordType(), clang::interp::Record::Base::Offset, clang::interp::Record::Field::Offset, clang::interp::PT_Uint64, visit(), and visitDeclRef().
Referenced by visitAPValueInitializer(), VisitConstantExpr(), visitDeclRef(), VisitSourceLocExpr(), and VisitTypeTraitExpr().
|
protected |
Definition at line 5439 of file Compiler.cpp.
References classify(), Ctx, clang::APValue::getArrayInitializedElt(), clang::APValue::getArraySize(), getRecord(), clang::APValue::getStructBase(), clang::APValue::getStructField(), clang::APValue::getStructNumBases(), clang::APValue::getStructNumFields(), clang::APValue::getUnionField(), clang::APValue::getUnionValue(), clang::APValue::isArray(), clang::APValue::isStruct(), clang::APValue::isUnion(), 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 2354 of file Compiler.cpp.
References clang::interp::InitLink::Elem(), clang::interp::Init(), visit(), and visitInitializerPop().
Referenced by VisitArrayInitLoopExpr(), VisitCastExpr(), VisitImaginaryLiteral(), and visitInitList().
| bool Compiler::VisitArrayInitIndexExpr | ( | const ArrayInitIndexExpr * | E | ) |
Definition at line 2709 of file Compiler.cpp.
References ArrayIndex, and DiscardResult.
| bool Compiler::VisitArrayInitLoopExpr | ( | const ArrayInitLoopExpr * | E | ) |
Definition at line 2719 of file Compiler.cpp.
References clang::cast(), classify(), clang::interp::LocalScope< Emitter >::destroyLocals(), clang::interp::discard(), DiscardResult, clang::interp::FullExpression, clang::ArrayInitLoopExpr::getArraySize(), clang::ArrayInitLoopExpr::getCommonExpr(), clang::ArrayInitLoopExpr::getSubExpr(), Initializing, visit(), and visitArrayElemInit().
| bool Compiler::VisitArraySubscriptExpr | ( | const ArraySubscriptExpr * | E | ) |
Definition at line 2020 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::Type::isVoidType(), clang::interp::PT_Ptr, clang::Success, and visit().
| bool Compiler::VisitArrayTypeTraitExpr | ( | const ArrayTypeTraitExpr * | E | ) |
Definition at line 3417 of file Compiler.cpp.
References DiscardResult, and clang::ArrayTypeTraitExpr::getValue().
Definition at line 4681 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 6643 of file Compiler.cpp.
References Ctx, clang::AttributedStmt::getAttrs(), clang::AttributedStmt::getSubStmt(), clang::Expr::HasSideEffects(), clang::hasSpecificAttr(), clang::isa(), clang::Expr::isValueDependent(), visitBool(), and visitStmt().
Referenced by visitStmt().
| bool Compiler::VisitBinaryOperator | ( | const BinaryOperator * | E | ) |
Definition at line 1064 of file Compiler.cpp.
References allocateLocal(), classify(), classifyPrim(), clang::Expr::containsErrors(), 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, visit(), VisitComplexBinOp(), VisitFixedPointBinOp(), VisitLogicalBinOp(), VisitPointerArithBinOp(), and VisitVectorBinOp().
Definition at line 4193 of file Compiler.cpp.
References Ctx, DiscardResult, and clang::Func.
Visits an expression and converts it to a boolean.
Definition at line 4687 of file Compiler.cpp.
References classify(), clang::Expr::getType(), clang::Type::isAnyComplexType(), clang::interp::PT_Bool, clang::interp::PT_Float, clang::interp::PT_Ptr, ToLValue, and visit().
Referenced by VisitAbstractConditionalOperator(), visitAttributedStmt(), visitCXXForRangeStmt(), visitDoStmt(), visitForStmt(), visitIfStmt(), VisitLogicalBinOp(), VisitUnaryOperator(), and visitWhileStmt().
Definition at line 6432 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 1000 of file Compiler.cpp.
| bool Compiler::VisitBuiltinCallExpr | ( | const CallExpr * | E, |
| unsigned | BuiltinID ) |
Definition at line 5537 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(), clang::interp::PT_Ptr, ReturnType, clang::interp::OptPrimType::value_or(), visit(), and visitAsLValue().
Referenced by VisitCallExpr().
|
protected |
Definition at line 2374 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 5634 of file Compiler.cpp.
References clang::interp::align(), allocateLocal(), allocateLocalPrimitive(), clang::interp::Call, clang::cast(), classify(), classifyPrim(), CompilingFunction, clang::Expr::containsErrors(), 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(), clang::CXXRecordDecl::hasTrivialDefaultConstructor(), Initializing, clang::isa(), clang::DeclarationName::isAnyOperatorNew(), clang::FunctionDecl::isUsableAsGlobalAllocationFunctionInConstantEvaluation(), clang::interp::primSize(), clang::interp::PT_MemberPtr, clang::interp::PT_Ptr, ReturnType, stripCheckedDerivedToBaseCasts(), visit(), VisitBuiltinCallExpr(), and visitCallArgs().
Definition at line 6619 of file Compiler.cpp.
References CaseLabels, clang::CaseStmt::getSubStmt(), and visitStmt().
Referenced by visitStmt().
Definition at line 213 of file Compiler.cpp.
References allocateLocal(), allocateLocalPrimitive(), allocateTemporary(), canClassify(), clang::Type::castAs(), clang::Type::castAsEnumDecl(), classify(), classifyPrim(), clang::Expr::containsErrors(), Ctx, delegate(), clang::interp::discard(), DiscardResult, clang::Type::getAs(), clang::CastExpr::getCastKind(), clang::VectorType::getNumElements(), clang::Type::getPointeeType(), getRecord(), clang::interp::getRoundingMode(), clang::CastExpr::getSubExpr(), clang::CastExpr::getTargetUnionField(), 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::isConstantMatrixType(), 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::CastExpr::path_begin(), clang::CastExpr::path_end(), clang::interp::PT_IntAP, clang::interp::PT_IntAPS, clang::interp::PT_MemberPtr, clang::interp::PT_Ptr, clang::interp::Reinterpret, clang::interp::ReinterpretLike, clang::interp::Context::shouldBeGloballyIndexed(), ToLValue, visit(), visitArrayElemInit(), visitInitializerPop(), and clang::interp::Volatile.
Referenced by VisitCXXDynamicCastExpr(), and VisitCXXReinterpretCastExpr().
| bool Compiler::VisitCharacterLiteral | ( | const CharacterLiteral * | E | ) |
Definition at line 2967 of file Compiler.cpp.
References DiscardResult, and clang::CharacterLiteral::getValue().
| bool Compiler::VisitChooseExpr | ( | const ChooseExpr * | E | ) |
Definition at line 3860 of file Compiler.cpp.
References delegate(), and clang::ChooseExpr::getChosenSubExpr().
| bool Compiler::VisitComplexBinOp | ( | const BinaryOperator * | E | ) |
Definition at line 1379 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 7344 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 3084 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 3344 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, visit(), and visitInitializer().
| bool Compiler::visitCompoundStmt | ( | const CompoundStmt * | S | ) |
Definition at line 6033 of file Compiler.cpp.
References clang::CompoundStmt::body(), and visitStmt().
Referenced by visitStmt().
| bool Compiler::VisitConceptSpecializationExpr | ( | const ConceptSpecializationExpr * | E | ) |
Definition at line 4311 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 2452 of file Compiler.cpp.
References classify(), delegate(), DiscardResult, clang::ConstantExpr::getAPValueResult(), clang::FullExpr::getSubExpr(), clang::ConstantExpr::hasAPValueResult(), and visitAPValue().
| bool Compiler::visitContinueStmt | ( | const ContinueStmt * | S | ) |
Definition at line 6472 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 4369 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 3325 of file Compiler.cpp.
References delegate(), DiscardResult, clang::CXXBindTemporaryExpr::getSubExpr(), Initializing, and visit().
| bool Compiler::VisitCXXBoolLiteralExpr | ( | const CXXBoolLiteralExpr * | E | ) |
Definition at line 5884 of file Compiler.cpp.
References DiscardResult, and clang::CXXBoolLiteralExpr::getValue().
| bool Compiler::VisitCXXConstructExpr | ( | const CXXConstructExpr * | E | ) |
Definition at line 3554 of file Compiler.cpp.
References clang::interp::align(), allocateLocal(), clang::CXXConstructExpr::arguments(), bool, canClassify(), classify(), Ctx, DiscardResult, clang::Func, std::function, clang::CXXConstructExpr::getArg(), clang::CXXConstructExpr::getConstructor(), clang::ArrayType::getElementType(), getFunction(), clang::CXXConstructExpr::getNumArgs(), clang::CXXMethodDecl::getParent(), getRecord(), clang::Expr::getType(), clang::ConstantArrayType::getZExtSize(), Initializing, clang::CXXConstructorDecl::isCopyOrMoveConstructor(), clang::FunctionDecl::isDefaulted(), clang::CXXConstructExpr::isElidable(), clang::Expr::isTemporaryObject(), clang::FunctionDecl::isTrivial(), clang::interp::primSize(), clang::interp::PT_Ptr, clang::CXXConstructExpr::requiresZeroInitialization(), visit(), and visitInitializer().
| bool Compiler::VisitCXXDefaultArgExpr | ( | const CXXDefaultArgExpr * | E | ) |
Definition at line 5877 of file Compiler.cpp.
References delegate(), and clang::CXXDefaultArgExpr::getExpr().
| bool Compiler::VisitCXXDefaultInitExpr | ( | const CXXDefaultInitExpr * | E | ) |
Definition at line 5870 of file Compiler.cpp.
References delegate(), and clang::CXXDefaultInitExpr::getExpr().
| bool Compiler::VisitCXXDeleteExpr | ( | const CXXDeleteExpr * | E | ) |
Definition at line 4177 of file Compiler.cpp.
References clang::Expr::containsErrors(), clang::CXXDeleteExpr::getArgument(), clang::CXXDeleteExpr::getOperatorDelete(), clang::CXXDeleteExpr::isArrayForm(), clang::CXXDeleteExpr::isGlobalDelete(), and visit().
| bool Compiler::VisitCXXDynamicCastExpr | ( | const CXXDynamicCastExpr * | E | ) |
Definition at line 3534 of file Compiler.cpp.
References Ctx, clang::interp::Dynamic, and VisitCastExpr().
| bool Compiler::visitCXXForRangeStmt | ( | const CXXForRangeStmt * | S | ) |
Definition at line 6376 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 3873 of file Compiler.cpp.
References classify(), clang::CXXInheritedCtorInitExpr::getConstructor(), getFunction(), clang::interp::Function::hasRVO(), clang::interp::Function::hasThisPointer(), clang::FunctionDecl::isTrivial(), clang::FunctionDecl::parameters(), and clang::interp::PT_Ptr.
| bool Compiler::VisitCXXNewExpr | ( | const CXXNewExpr * | E | ) |
Definition at line 3906 of file Compiler.cpp.
References allocateLocalPrimitive(), classify(), classifyPrim(), clang::Expr::containsErrors(), 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::isa(), clang::CXXNewExpr::isArray(), clang::Type::isArrayType(), clang::Type::isIncompleteArrayType(), clang::Type::isNothrowT(), P, clang::interp::PT_Ptr, SizeT, visit(), visitInitializer(), and visitInitializerPop().
| bool Compiler::VisitCXXNoexceptExpr | ( | const CXXNoexceptExpr * | E | ) |
Definition at line 3545 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 5892 of file Compiler.cpp.
References Ctx, DiscardResult, and clang::Expr::getType().
| bool Compiler::VisitCXXParenListInitExpr | ( | const CXXParenListInitExpr * | E | ) |
Definition at line 2440 of file Compiler.cpp.
References clang::CXXParenListInitExpr::getArrayFiller(), clang::CXXParenListInitExpr::getInitExprs(), and visitInitList().
| bool Compiler::VisitCXXReinterpretCastExpr | ( | const CXXReinterpretCastExpr * | E | ) |
Definition at line 3482 of file Compiler.cpp.
References classify(), delegate(), clang::CastExpr::getCastKind(), clang::Type::getPointeeType(), clang::CastExpr::getSubExpr(), clang::Expr::getType(), clang::QualType::getTypePtr(), clang::interp::isIntegerOrBoolType(), clang::Type::isPointerOrReferenceType(), clang::interp::PT_Ptr, clang::interp::Reinterpret, and VisitCastExpr().
| bool Compiler::VisitCXXRewrittenBinaryOperator | ( | const CXXRewrittenBinaryOperator * | E | ) |
Definition at line 4320 of file Compiler.cpp.
References delegate(), and clang::CXXRewrittenBinaryOperator::getSemanticForm().
| bool Compiler::VisitCXXScalarValueInitExpr | ( | const CXXScalarValueInitExpr * | E | ) |
Definition at line 3790 of file Compiler.cpp.
References allocateLocal(), classify(), classifyPrim(), DiscardResult, clang::Type::getAs(), clang::Expr::getType(), Initializing, and clang::Type::isVoidType().
| bool Compiler::VisitCXXStdInitializerListExpr | ( | const CXXStdInitializerListExpr * | E | ) |
Definition at line 4538 of file Compiler.cpp.
References classifyPrim(), Ctx, getRecord(), clang::CXXStdInitializerListExpr::getSubExpr(), clang::Expr::getType(), Initializing, clang::Expr::isGLValue(), clang::interp::isIntegerOrBoolType(), clang::interp::PT_Ptr, clang::interp::PT_Uint64, and visit().
| bool Compiler::VisitCXXThisExpr | ( | const CXXThisExpr * | E | ) |
Definition at line 5913 of file Compiler.cpp.
References DiscardResult, emit(), InitStack, InitStackActive, clang::interp::InitLink::K_DIE, clang::interp::InitLink::K_Elem, clang::interp::InitLink::K_Field, and clang::interp::InitLink::K_InitList.
| bool Compiler::VisitCXXThrowExpr | ( | const CXXThrowExpr * | E | ) |
Definition at line 3474 of file Compiler.cpp.
References clang::CXXThrowExpr::getSubExpr().
| bool Compiler::visitCXXTryStmt | ( | const CXXTryStmt * | S | ) |
Definition at line 6687 of file Compiler.cpp.
References clang::CXXTryStmt::getTryBlock(), and visitStmt().
Referenced by visitStmt().
| bool Compiler::VisitCXXTypeidExpr | ( | const CXXTypeidExpr * | E | ) |
Definition at line 4207 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(), and visit().
| bool Compiler::VisitCXXUuidofExpr | ( | const CXXUuidofExpr * | E | ) |
Definition at line 4267 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 5159 of file Compiler.cpp.
References clang::interp::Block::getBlockDesc(), clang::VarDecl::getInit(), clang::interp::InitializerFailed, clang::interp::GlobalInlineDescriptor::InitState, clang::interp::Block::invokeDtor(), P, 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 5186 of file Compiler.cpp.
References classify(), clang::interp::LocalScope< Emitter >::destroyLocals(), clang::interp::Block::getBlockDesc(), 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::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 7559 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::interp::PT_Ptr, V, VariablesAreConstexprUnknown, 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 7740 of file Compiler.cpp.
References clang::DeclRefExpr::getDecl(), and visitDeclRef().
| bool Compiler::visitDeclStmt | ( | const DeclStmt * | DS, |
| bool | EvaluateConditionDecl = false ) |
Definition at line 6101 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 6626 of file Compiler.cpp.
References clang::DefaultStmt::getSubStmt(), LabelInfoStack, and visitStmt().
Referenced by visitStmt().
Definition at line 6286 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 2470 of file Compiler.cpp.
References clang::EmbedExpr::begin(), and visit().
|
overrideprotected |
Definition at line 5115 of file Compiler.cpp.
References allocateLocal(), classify(), clang::interp::LocalScope< Emitter >::destroyLocals(), clang::interp::FullExpression, clang::Expr::getType(), clang::Type::isVoidType(), clang::interp::InitLink::Temp(), visit(), and visitInitializer().
| bool Compiler::VisitExpressionTraitExpr | ( | const ExpressionTraitExpr * | E | ) |
Definition at line 4261 of file Compiler.cpp.
References Ctx, and clang::ExpressionTraitExpr::getValue().
| bool Compiler::VisitExprWithCleanups | ( | const ExprWithCleanups * | E | ) |
Definition at line 3205 of file Compiler.cpp.
References delegate(), clang::interp::LocalScope< Emitter >::destroyLocals(), clang::interp::FullExpression, and clang::FullExpr::getSubExpr().
| bool Compiler::VisitExtVectorElementExpr | ( | const ExtVectorElementExpr * | E | ) |
Definition at line 4465 of file Compiler.cpp.
References allocateLocal(), allocateLocalPrimitive(), classifyPrim(), DiscardResult, clang::Type::getAs(), clang::ElementAccessExprBase< Derived >::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 1831 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, and visit().
Referenced by VisitBinaryOperator().
| bool Compiler::VisitFixedPointLiteral | ( | const FixedPointLiteral * | E | ) |
Definition at line 1046 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 1916 of file Compiler.cpp.
References delegate(), DiscardResult, 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 2974 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 1013 of file Compiler.cpp.
References DiscardResult, and clang::FloatingLiteral::getValue().
Definition at line 6320 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 7035 of file Compiler.cpp.
References classify(), CompilingFunction, clang::FunctionDecl::getBody(), clang::CXXMethodDecl::getParent(), clang::FunctionDecl::getReturnType(), clang::CXXMethodDecl::isCopyAssignmentOperator(), clang::Type::isDependentType(), clang::CXXMethodDecl::isLambdaStaticInvoker(), clang::CXXMethodDecl::isMoveAssignmentOperator(), clang::TagDecl::isUnion(), clang::Type::isVoidType(), ReturnType, and visitStmt().
| bool Compiler::VisitGenericSelectionExpr | ( | const GenericSelectionExpr * | E | ) |
Definition at line 3854 of file Compiler.cpp.
References delegate(), and clang::GenericSelectionExpr::getResultExpr().
| bool Compiler::VisitGNUNullExpr | ( | const GNUNullExpr * | E | ) |
Definition at line 5902 of file Compiler.cpp.
References classifyPrim(), DiscardResult, clang::Expr::getType(), and clang::Type::isIntegerType().
Definition at line 6161 of file Compiler.cpp.
References clang::interp::LocalScope< Emitter >::destroyLocals(), clang::interp::FullExpression, 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 1022 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 1939 of file Compiler.cpp.
References classify(), classifyPrim(), DiscardResult, clang::Type::getAs(), clang::Type::getAsRecordDecl(), getRecord(), clang::Expr::getType(), Initializing, clang::Type::isArrayType(), clang::Type::isIncompleteArrayType(), clang::Decl::isInvalidDecl(), and clang::Type::isRecordType().
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 4664 of file Compiler.cpp.
References canClassify(), clang::Expr::getType(), and clang::StmtVisitorBase< llvm::make_const_ptr, Compiler< Emitter >, bool, ParamTys... >::Visit().
Referenced by visit(), visitCallArgs(), VisitCompoundLiteralExpr(), VisitCXXConstructExpr(), VisitCXXNewExpr(), visitExpr(), VisitMaterializeTemporaryExpr(), VisitOpaqueValueExpr(), and visitVarDecl().
Similar, but will also pop the pointer.
Definition at line 4673 of file Compiler.cpp.
References canClassify(), clang::Expr::getType(), and clang::StmtVisitorBase< llvm::make_const_ptr, Compiler< Emitter >, bool, ParamTys... >::Visit().
Referenced by visitArrayElemInit(), VisitCastExpr(), VisitCXXNewExpr(), visitInitList(), VisitLambdaExpr(), visitReturnStmt(), and visitVarDecl().
|
protected |
Definition at line 2072 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::ArrayType::getElementType(), getRecord(), clang::Expr::getType(), clang::APIntStorage::getValue(), clang::ConstantArrayType::getZExtSize(), clang::interp::Init(), clang::interp::InitLink::InitList(), clang::Inits, clang::isa(), clang::Type::isArrayType(), clang::Type::isRecordType(), clang::Type::isVoidType(), clang::interp::PT_Float, visit(), visitArrayElemInit(), and visitInitializerPop().
Referenced by VisitCXXParenListInitExpr(), and VisitInitListExpr().
| bool Compiler::VisitInitListExpr | ( | const InitListExpr * | E | ) |
Definition at line 2435 of file Compiler.cpp.
References clang::InitListExpr::getArrayFiller(), clang::InitListExpr::inits(), and visitInitList().
| bool Compiler::VisitIntegerLiteral | ( | const IntegerLiteral * | E | ) |
Definition at line 1005 of file Compiler.cpp.
References DiscardResult, and clang::interp::LE().
| bool Compiler::VisitLambdaExpr | ( | const LambdaExpr * | E | ) |
Definition at line 3424 of file Compiler.cpp.
References clang::LambdaExpr::capture_init_begin(), classify(), DiscardResult, clang::LambdaExpr::getLambdaClass(), clang::interp::Init(), Initializing, P, visit(), and visitInitializerPop().
| bool Compiler::VisitLogicalBinOp | ( | const BinaryOperator * | E | ) |
Definition at line 1318 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, and visitBool().
Referenced by VisitBinaryOperator().
| bool Compiler::VisitMaterializeTemporaryExpr | ( | const MaterializeTemporaryExpr * | E | ) |
Definition at line 3213 of file Compiler.cpp.
References allocateLocal(), allocateLocalPrimitive(), clang::interp::Block, classify(), Ctx, delegate(), clang::interp::discard(), DiscardResult, clang::interp::FullExpression, 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_FullExpression, clang::SD_Static, clang::interp::Context::shouldBeGloballyIndexed(), clang::Expr::skipRValueSubobjectAdjustments(), clang::interp::InitLink::Temp(), VarScope, visit(), and visitInitializer().
| bool Compiler::VisitMemberExpr | ( | const MemberExpr * | E | ) |
Definition at line 2646 of file Compiler.cpp.
References clang::cast(), classify(), clang::interp::discard(), DiscardResult, clang::MemberExpr::getBase(), clang::MemberExpr::getMemberDecl(), clang::DeclContext::getParent(), getRecord(), clang::isa(), clang::Expr::isGLValue(), clang::Member, P, clang::interp::PT_Ptr, visit(), and visitDeclRef().
| bool Compiler::VisitObjCArrayLiteral | ( | const ObjCArrayLiteral * | E | ) |
Definition at line 4254 of file Compiler.cpp.
References clang::ObjCObjectLiteral::isExpressibleAsConstantInitializer().
| bool Compiler::VisitObjCBoolLiteralExpr | ( | const ObjCBoolLiteralExpr * | E | ) |
Definition at line 3865 of file Compiler.cpp.
References DiscardResult, and clang::ObjCBoolLiteralExpr::getValue().
| bool Compiler::VisitObjCBoxedExpr | ( | const ObjCBoxedExpr * | E | ) |
Definition at line 4525 of file Compiler.cpp.
References classifyPrim(), clang::interp::discard(), DiscardResult, clang::ObjCBoxedExpr::getSubExpr(), clang::ObjCObjectLiteral::isExpressibleAsConstantInitializer(), and clang::interp::PT_Ptr.
| bool Compiler::VisitObjCDictionaryLiteral | ( | const ObjCDictionaryLiteral * | E | ) |
Definition at line 4246 of file Compiler.cpp.
References clang::ObjCObjectLiteral::isExpressibleAsConstantInitializer().
| bool Compiler::VisitObjCEncodeExpr | ( | const ObjCEncodeExpr * | E | ) |
Definition at line 2932 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 2925 of file Compiler.cpp.
References DiscardResult.
| bool Compiler::VisitOffsetOfExpr | ( | const OffsetOfExpr * | E | ) |
Definition at line 3755 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, and visit().
| bool Compiler::VisitOpaqueValueExpr | ( | const OpaqueValueExpr * | E | ) |
Definition at line 2761 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 4350 of file Compiler.cpp.
References delegate(), and clang::PackIndexingExpr::getSelectedExpr().
Definition at line 1059 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 1230 of file Compiler.cpp.
References classify(), classifyPrim(), Ctx, DiscardResult, clang::BinaryOperator::getLHS(), clang::BinaryOperator::getOpcode(), clang::Type::getPointeeType(), clang::BinaryOperator::getRHS(), clang::Expr::getType(), clang::Type::isFunctionType(), clang::Type::isIntegerType(), clang::Type::isPointerType(), clang::Type::isVoidType(), clang::CharUnits::isZero(), clang::interp::LT(), clang::CharUnits::One(), clang::interp::PT_Ptr, and visit().
Referenced by VisitBinaryOperator().
| bool Compiler::VisitPointerCompoundAssignOperator | ( | const CompoundAssignOperator * | E | ) |
Definition at line 3047 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 3461 of file Compiler.cpp.
References delegate(), DiscardResult, clang::PredefinedExpr::getFunctionName(), Initializing, and P.
| bool Compiler::VisitPseudoObjectExpr | ( | const PseudoObjectExpr * | E | ) |
Definition at line 4326 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 4355 of file Compiler.cpp.
| bool Compiler::VisitRequiresExpr | ( | const RequiresExpr * | E | ) |
Definition at line 4301 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 6123 of file Compiler.cpp.
References emitCleanup(), clang::ReturnStmt::getRetValue(), InStmtExpr, ReturnType, clang::interp::InitLink::RVO(), visit(), and visitInitializerPop().
Referenced by visitStmt().
| bool Compiler::VisitShuffleVectorExpr | ( | const ShuffleVectorExpr * | E | ) |
Definition at line 4408 of file Compiler.cpp.
References allocateLocal(), allocateLocalPrimitive(), clang::Type::castAs(), classifyPrim(), DiscardResult, 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 3849 of file Compiler.cpp.
References clang::SizeOfPackExpr::getPackLength().
| bool Compiler::VisitSourceLocExpr | ( | const SourceLocExpr * | E | ) |
Definition at line 3699 of file Compiler.cpp.
References clang::cast(), classifyPrim(), Ctx, DiscardResult, clang::SourceLocExpr::EvaluateInContext(), clang::APValue::getInt(), clang::APValue::getLValueBase(), clang::APValue::getLValuePath(), 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 5983 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 4576 of file Compiler.cpp.
References clang::CompoundStmt::body(), clang::CompoundStmt::body_back(), delegate(), clang::interp::LocalScope< Emitter >::destroyLocals(), clang::StmtExpr::getSubStmt(), clang::Result, and visitStmt().
| bool Compiler::VisitStringLiteral | ( | const StringLiteral * | E | ) |
Definition at line 2868 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 2446 of file Compiler.cpp.
References delegate(), and clang::SubstNonTypeTemplateParmExpr::getReplacement().
| bool Compiler::visitSwitchStmt | ( | const SwitchStmt * | S | ) |
Definition at line 6509 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::Expr::getType(), clang::Value::getType(), clang::Expr::isValueDependent(), clang::interp::LT(), visit(), visitDeclStmt(), and visitStmt().
Referenced by visitStmt().
| bool Compiler::VisitSYCLUniqueStableNameExpr | ( | const SYCLUniqueStableNameExpr * | E | ) |
Definition at line 2943 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 3404 of file Compiler.cpp.
References classifyPrim(), DiscardResult, clang::TypeTraitExpr::getAPValue(), clang::TypeTraitExpr::getBoolValue(), clang::Expr::getType(), clang::Type::isBooleanType(), clang::TypeTraitExpr::isStoredAsBoolean(), and visitAPValue().
| bool Compiler::VisitUnaryExprOrTypeTraitExpr | ( | const UnaryExprOrTypeTraitExpr * | E | ) |
Definition at line 2499 of file Compiler.cpp.
References AlignOfType(), clang::Expr::containsErrors(), 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 7080 of file Compiler.cpp.
References clang::UnaryOperator::canOverflow(), clang::cast(), classify(), classifyPrim(), Ctx, delegate(), clang::interp::discard(), DiscardResult, getBitWidth(), clang::UnaryOperator::getOpcode(), clang::UnaryOperator::getSubExpr(), clang::Expr::getType(), clang::Type::isAnyComplexType(), clang::Type::isFixedPointType(), clang::Type::isFunctionPointerType(), clang::Expr::isGLValue(), clang::interp::isIntegerOrBoolType(), clang::Type::isMemberPointerType(), clang::Type::isVectorType(), clang::interp::PT_Bool, clang::interp::PT_Float, clang::interp::PT_Ptr, clang::Expr::refersToBitField(), true, visit(), visitBool(), VisitComplexUnaryOperator(), VisitFixedPointUnaryOperator(), and VisitVectorUnaryOperator().
|
protected |
Creates and initializes a variable from the given decl.
Definition at line 5245 of file Compiler.cpp.
References allocateLocal(), allocateLocalPrimitive(), clang::interp::Block, classify(), classifyPrim(), clang::interp::InitLink::Decl(), clang::ValueDecl::getType(), clang::interp::Init(), clang::QualType::isConstQualified(), clang::VarDecl::isLocalVarDecl(), clang::QualType::isNull(), clang::Type::isReferenceType(), clang::VarDecl::isStaticLocal(), clang::QualType::isVolatileQualified(), clang::interp::VarCreationState::NotCreated(), P, clang::interp::PT_Ptr, clang::interp::Context::shouldBeGloballyIndexed(), visit(), visitInitializer(), and visitInitializerPop().
Referenced by visitDecl(), visitDeclAndReturn(), and visitDeclStmt().
| bool Compiler::VisitVectorBinOp | ( | const BinaryOperator * | E | ) |
Definition at line 1619 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 7452 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 6242 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.
|
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 469 of file Compiler.h.
Referenced by VisitArrayInitIndexExpr().
|
protected |
Switch case mapping.
Definition at line 494 of file Compiler.h.
Referenced by visitCaseStmt(), and visitSwitchStmt().
|
protected |
Definition at line 498 of file Compiler.h.
Referenced by VisitCallExpr(), and visitFunc().
|
protected |
Current compilation context.
Definition at line 135 of file Compiler.h.
Referenced by canClassify(), canClassify(), classify(), classify(), Compiler(), getFunction(), visitAPValue(), visitAPValueInitializer(), visitAttributedStmt(), VisitBinaryOperator(), VisitBlockExpr(), VisitCallExpr(), VisitCastExpr(), VisitCompoundAssignOperator(), VisitConvertVectorExpr(), VisitCXXConstructExpr(), VisitCXXDynamicCastExpr(), VisitCXXNewExpr(), VisitCXXNullPtrLiteralExpr(), VisitCXXStdInitializerListExpr(), VisitCXXTypeidExpr(), visitDeclRef(), VisitExpressionTraitExpr(), VisitFixedPointBinOp(), VisitFixedPointLiteral(), visitInitList(), VisitMaterializeTemporaryExpr(), VisitObjCEncodeExpr(), VisitPointerArithBinOp(), VisitSourceLocExpr(), VisitStringLiteral(), VisitSYCLUniqueStableNameExpr(), VisitUnaryExprOrTypeTraitExpr(), VisitUnaryOperator(), VisitVectorBinOp(), and VisitVectorUnaryOperator().
|
protected |
Flag indicating if return value is to be discarded.
Definition at line 475 of file Compiler.h.
Referenced by VisitAddrLabelExpr(), visitAPValue(), VisitArrayInitIndexExpr(), 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(), VisitFixedPointUnaryOperator(), VisitFloatCompoundAssignOperator(), VisitFloatingLiteral(), VisitGNUNullExpr(), VisitImaginaryLiteral(), VisitImplicitValueInitExpr(), visitInitList(), VisitIntegerLiteral(), VisitLambdaExpr(), VisitLogicalBinOp(), VisitMaterializeTemporaryExpr(), VisitMemberExpr(), VisitObjCBoolLiteralExpr(), VisitObjCBoxedExpr(), VisitObjCStringLiteral(), VisitOffsetOfExpr(), VisitOpaqueValueExpr(), VisitPointerArithBinOp(), VisitPointerCompoundAssignOperator(), VisitPredefinedExpr(), VisitRequiresExpr(), VisitShuffleVectorExpr(), 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 484 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 485 of file Compiler.h.
Referenced by visitDeclRef().
|
protected |
Definition at line 487 of file Compiler.h.
Referenced by VisitCXXThisExpr().
|
protected |
Definition at line 488 of file Compiler.h.
Referenced by VisitCXXThisExpr().
|
protected |
Definition at line 477 of file Compiler.h.
Referenced by visitReturnStmt().
|
protected |
Stack of label information for loops and switch statements.
Definition at line 496 of file Compiler.h.
Referenced by visitBreakStmt(), visitContinueStmt(), and visitDefaultStmt().
|
protected |
Variable to storage mapping.
Definition at line 460 of file Compiler.h.
Referenced by allocateLocal(), allocateLocalPrimitive(), VisitCastExpr(), visitDeclAndReturn(), and visitDeclRef().
|
protected |
OpaqueValueExpr to location mapping.
Definition at line 463 of file Compiler.h.
Referenced by VisitOpaqueValueExpr().
|
protected |
Program to link to.
Definition at line 137 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 491 of file Compiler.h.
Referenced by VisitBuiltinCallExpr(), VisitCallExpr(), visitFunc(), and visitReturnStmt().
|
protected |
DefaultInit- or DefaultArgExpr, needed for SourceLocExpr.
Definition at line 472 of file Compiler.h.
Referenced by VisitSourceLocExpr().
|
protected |
Definition at line 478 of file Compiler.h.
Referenced by visit(), visitBool(), and VisitCastExpr().
|
protected |
Definition at line 480 of file Compiler.h.
Referenced by allocateLocal(), allocateLocalPrimitive(), and visitDeclRef().
|
protected |
Current scope.
Definition at line 466 of file Compiler.h.
Referenced by allocateLocal(), allocateLocalPrimitive(), allocateTemporary(), emitCleanup(), VisitAbstractConditionalOperator(), visitBreakStmt(), visitCallArgs(), visitContinueStmt(), and VisitMaterializeTemporaryExpr().