A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://clang.llvm.org/doxygen/classclang_1_1interp_1_1Compiler.html below:

clang: clang::interp::Compiler< Emitter > Class Template Reference

Compilation context for expressions. More...

#include "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/AST/ByteCode/Compiler.h"

bool  visitStmt (const Stmt *S)   bool  visitExpr (const Expr *E, bool DestroyToplevelScope) override   bool  visitFunc (const FunctionDecl *F) override   bool  visitDeclAndReturn (const VarDecl *VD, bool ConstantContext) override   Toplevel visitDeclAndReturn().
  void  emitCleanup ()   Emits scope cleanup instructions.
  const RecordTypegetRecordTy (QualType Ty)   Returns a record type from a record or pointer type.
  RecordgetRecord (QualType Ty)   Returns a record from a record or pointer type.
  RecordgetRecord (const RecordDecl *RD)   const FunctiongetFunction (const FunctionDecl *FD)   Returns a function for the given FunctionDecl.
  std::optional< PrimTypeclassify (const Expr *E) const   std::optional< PrimTypeclassify (QualType Ty) 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)   Evaluates an expression and places the result on the stack.
  bool  visitInitializer (const Expr *E)   Compiles an initializer.
  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, 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)   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)   Pointer to the array(not the element!) must be on the stack when calling this.
  unsigned  allocateLocalPrimitive (DeclTy &&Decl, PrimType Ty, bool IsConst, bool IsExtended=false)   Creates a local primitive value.
  std::optional< unsignedallocateLocal (DeclTy &&Decl, QualType Ty=QualType(), const ValueDecl *ExtendingDecl=nullptr)   Allocates a space storing a local given its type.
  std::optional< unsignedallocateTemporary (const Expr *E)  

template<class

Emitter

>

class clang::interp::Compiler< Emitter >

Compilation context for expressions.

Definition at line 107 of file Compiler.h.

◆ AddrTy ◆ CaseMap ◆ LabelTy ◆ OptLabelTy ◆ Compiler()

template<typename... Tys>

Initializes the compiler and the backend emitter.

Definition at line 124 of file Compiler.h.

◆ allocateLocal() ◆ allocateLocalPrimitive() ◆ allocateTemporary() std::optional< unsigned > Compiler::allocateTemporary ( const ExprE ) protected ◆ classify() [1/2] ◆ classify() [2/2] ◆ classifyPrim() [1/2] ◆ classifyPrim() [2/2] ◆ delegate() bool Compiler::delegate ( const ExprE ) protected

Just pass evaluation on to E.

This leaves all the parsing flags intact.

Definition at line 3824 of file Compiler.cpp.

References E.

◆ discard() bool Compiler::discard ( const ExprE ) protected

Evaluates an expression for side effects and discards the result.

Definition at line 3818 of file Compiler.cpp.

References E.

◆ emitCleanup() void Compiler::emitCleanup protected ◆ getFunction()

Returns a function for the given FunctionDecl.

If the function does not exist yet, it is compiled.

Definition at line 4227 of file Compiler.cpp.

◆ getRecord() [1/2] ◆ getRecord() [2/2]

Returns a record from a record or pointer type.

Definition at line 4215 of file Compiler.cpp.

◆ getRecordTy() ◆ visit() ◆ VisitAbstractConditionalOperator() ◆ VisitAddrLabelExpr() ◆ visitAPValue() ◆ visitAPValueInitializer() bool Compiler::visitAPValueInitializer ( const APValueVal, const ExprE  ) protected

Definition at line 4512 of file Compiler.cpp.

References E, clang::APValue::getArrayInitializedElt(), clang::APValue::getArraySize(), clang::interp::Record::getField(), clang::FieldDecl::getParent(), clang::APValue::getStructField(), clang::APValue::getStructNumFields(), clang::Expr::getType(), clang::APValue::getUnionField(), clang::APValue::getUnionValue(), clang::APValue::isArray(), clang::APValue::isFloat(), clang::APValue::isInt(), clang::APValue::isLValue(), clang::APValue::isMemberPointer(), clang::APValue::isStruct(), clang::APValue::isUnion(), and clang::T.

◆ visitArrayElemInit() ◆ VisitArrayInitIndexExpr() ◆ VisitArrayInitLoopExpr() ◆ VisitArraySubscriptExpr() ◆ VisitArrayTypeTraitExpr() ◆ visitAttributedStmt() ◆ VisitBinaryOperator()

Definition at line 802 of file Compiler.cpp.

References clang::ASTContext::CompCategories, clang::BinaryOperator::getLHS(), clang::BinaryOperator::getOpcode(), clang::BinaryOperator::getRHS(), clang::Expr::getType(), clang::Initializing, clang::Type::isAnyComplexType(), clang::BinaryOperator::isCommaOp(), clang::BinaryOperator::isComparisonOp(), clang::Type::isFixedPointType(), clang::Type::isFloatingType(), clang::BinaryOperator::isLogicalOp(), clang::Expr::isLValue(), clang::BinaryOperator::isPtrMemOp(), clang::interp::isPtrType(), clang::Type::isVectorType(), clang::Type::isVoidType(), clang::ComparisonCategories::lookupInfoForType(), LT, clang::interp::PT_Bool, clang::interp::PT_MemberPtr, clang::Expr::refersToBitField(), and clang::T.

◆ VisitBlockExpr() ◆ visitBool() bool Compiler::visitBool ( const ExprE ) protected ◆ visitBreakStmt() ◆ VisitBuiltinCallExpr() ◆ VisitCallExpr()

Definition at line 4624 of file Compiler.cpp.

References clang::interp::align(), clang::interp::collectNonNullArgs(), E, clang::Func, clang::DeclarationName::getCXXOverloadedOperator(), clang::NamedDecl::getDeclName(), clang::Initializing, clang::FunctionDecl::isReplaceableGlobalAllocationFunction(), clang::Type::isVoidType(), clang::interp::primSize(), clang::interp::PT_FnPtr, clang::interp::PT_MemberPtr, clang::interp::PT_Ptr, and clang::T.

◆ visitCaseStmt() ◆ VisitCastExpr()

Definition at line 195 of file Compiler.cpp.

References clang::Type::getAs(), clang::QualType::getCanonicalType(), clang::CastExpr::getCastKind(), clang::MemberPointerType::getClass(), clang::EnumType::getDecl(), clang::ASTContext::getFixedPointSemantics(), clang::ASTContext::getLangOpts(), clang::VectorType::getNumElements(), clang::Type::getPointeeType(), clang::interp::getRoundingMode(), clang::CastExpr::getSubExpr(), clang::ASTContext::getTargetNullPointerValue(), clang::Expr::getType(), clang::QualType::getTypePtr(), clang::Initializing, clang::interp::Descriptor::InlineDescMD, clang::Type::isAnyComplexType(), clang::Type::isAtomicType(), clang::Type::isEnumeralType(), clang::EnumDecl::isFixed(), clang::Type::isFloatingType(), clang::Type::isIntegralOrEnumerationType(), clang::QualType::isNull(), clang::interp::isPtrType(), clang::Type::isVectorType(), clang::Type::isVoidPointerType(), clang::Type::isVoidType(), P, clang::CastExpr::path(), clang::interp::PT_IntAP, clang::interp::PT_IntAPS, clang::interp::PT_MemberPtr, clang::interp::PT_Ptr, and clang::T.

◆ VisitCharacterLiteral() ◆ VisitChooseExpr() ◆ VisitComplexBinOp() ◆ VisitComplexUnaryOperator() ◆ VisitCompoundAssignOperator() ◆ VisitCompoundLiteralExpr() ◆ visitCompoundStmt() ◆ VisitConceptSpecializationExpr() ◆ VisitConstantExpr() ◆ visitContinueStmt() ◆ VisitConvertVectorExpr() ◆ VisitCXXBindTemporaryExpr() ◆ VisitCXXBoolLiteralExpr() ◆ VisitCXXConstructExpr()

Definition at line 2975 of file Compiler.cpp.

References clang::interp::align(), E, clang::Func, clang::ASTContext::getAsConstantArrayType(), clang::Type::getAsCXXRecordDecl(), clang::Expr::getType(), clang::ConstantArrayType::getZExtSize(), clang::Initializing, clang::Type::isArrayType(), clang::CXXConstructorDecl::isCopyOrMoveConstructor(), clang::FunctionDecl::isDefaulted(), clang::Type::isRecordType(), clang::Expr::isTemporaryObject(), clang::FunctionDecl::isTrivial(), clang::interp::primSize(), clang::interp::PT_Ptr, and clang::T.

◆ VisitCXXDefaultArgExpr() ◆ VisitCXXDefaultInitExpr() ◆ VisitCXXDeleteExpr() ◆ visitCXXForRangeStmt() ◆ VisitCXXInheritedCtorInitExpr() ◆ VisitCXXNewExpr() ◆ VisitCXXNoexceptExpr() ◆ VisitCXXNullPtrLiteralExpr() ◆ VisitCXXParenListInitExpr() ◆ VisitCXXReinterpretCastExpr() ◆ VisitCXXRewrittenBinaryOperator() ◆ VisitCXXScalarValueInitExpr() ◆ VisitCXXStdInitializerListExpr()

Definition at line 3757 of file Compiler.cpp.

References clang::interp::Record::Field::Decl, E, clang::ASTContext::getAsConstantArrayType(), clang::interp::Record::getField(), clang::ValueDecl::getType(), clang::Expr::getType(), clang::Initializing, clang::Expr::isGLValue(), clang::interp::isIntegralType(), clang::interp::Record::Field::Offset, clang::interp::PT_Ptr, and clang::interp::PT_Uint64.

◆ VisitCXXThisExpr() ◆ VisitCXXThrowExpr() ◆ visitCXXTryStmt() ◆ VisitCXXTypeidExpr() ◆ VisitCXXUuidofExpr() ◆ visitDecl() ◆ visitDeclAndReturn() bool Compiler::visitDeclAndReturn ( const VarDeclVD, bool  ConstantContext  ) overrideprotected ◆ visitDeclRef() ◆ VisitDeclRefExpr() ◆ visitDeclStmt() ◆ visitDefaultStmt() ◆ visitDoStmt() ◆ VisitEmbedExpr() ◆ visitExpr() bool Compiler::visitExpr ( const ExprE, bool  DestroyToplevelScope  ) overrideprotected ◆ VisitExpressionTraitExpr() ◆ VisitExprWithCleanups() ◆ VisitExtVectorElementExpr()

Definition at line 3682 of file Compiler.cpp.

References E, clang::Type::getAs(), clang::VectorType::getElementType(), clang::VectorType::getNumElements(), clang::PointerType::getPointeeType(), clang::Expr::getType(), clang::Initializing, clang::Expr::isGLValue(), clang::Type::isVectorType(), clang::interp::PT_Ptr, and clang::interp::PT_Uint32.

◆ VisitFixedPointBinOp() ◆ VisitFixedPointLiteral() ◆ VisitFixedPointUnaryOperator() ◆ VisitFloatCompoundAssignOperator() ◆ VisitFloatingLiteral() ◆ visitForStmt() ◆ visitFunc() ◆ VisitGenericSelectionExpr() ◆ VisitGNUNullExpr() ◆ visitIfStmt() ◆ VisitImaginaryLiteral() ◆ VisitImplicitValueInitExpr() ◆ visitInitializer() bool Compiler::visitInitializer ( const ExprE ) protected ◆ visitInitList()

Definition at line 1736 of file Compiler.cpp.

References clang::interp::Record::Field::Decl, E, clang::interp::InitLink::Field(), clang::Type::getAs(), clang::ASTContext::getAsConstantArrayType(), clang::interp::Record::getBase(), clang::interp::Record::getField(), clang::Expr::getType(), clang::ConstantArrayType::getZExtSize(), clang::Init, clang::interp::InitLink::InitList(), clang::Type::isArrayType(), clang::Type::isRecordType(), clang::interp::Record::isUnion(), clang::FieldDecl::isUnnamedBitField(), clang::Type::isVoidType(), and clang::T.

◆ VisitInitListExpr() ◆ VisitIntegerLiteral() ◆ VisitLambdaExpr() ◆ VisitLogicalBinOp() ◆ VisitMaterializeTemporaryExpr() ◆ VisitMemberExpr() ◆ VisitObjCBoolLiteralExpr() ◆ VisitObjCBoxedExpr() ◆ VisitObjCEncodeExpr() ◆ VisitObjCStringLiteral() ◆ VisitOffsetOfExpr() ◆ VisitOpaqueValueExpr() ◆ VisitPackIndexingExpr() ◆ VisitParenExpr() ◆ VisitPointerArithBinOp() ◆ VisitPointerCompoundAssignOperator() ◆ VisitPredefinedExpr() ◆ VisitPseudoObjectExpr() ◆ VisitRecoveryExpr() ◆ VisitRequiresExpr() ◆ visitReturnStmt() ◆ VisitShuffleVectorExpr() ◆ VisitSizeOfPackExpr() ◆ VisitSourceLocExpr()

Definition at line 3095 of file Compiler.cpp.

References E, clang::interp::Record::getField(), clang::APValue::getInt(), clang::APValue::getLValueBase(), clang::APValue::getLValuePath(), clang::interp::Record::getNumFields(), clang::Expr::getType(), clang::APValue::isInt(), clang::Type::isIntegerType(), clang::APValue::isLValue(), clang::Type::isPointerType(), P, and V.

◆ visitStmt() bool Compiler::visitStmt ( const StmtS ) protected ◆ VisitStmtExpr() ◆ VisitStringLiteral() ◆ VisitSubstNonTypeTemplateParmExpr() ◆ visitSwitchStmt() ◆ VisitSYCLUniqueStableNameExpr() ◆ VisitTypeTraitExpr() ◆ VisitUnaryExprOrTypeTraitExpr()

Definition at line 2065 of file Compiler.cpp.

References AlignOfType(), E, clang::Type::getAs(), clang::ASTContext::getDeclAlign(), clang::ASTContext::getOpenMPDefaultSimdAlign(), clang::Type::getPointeeType(), clang::CharUnits::getQuantity(), clang::Expr::getType(), clang::ASTContext::getTypeInfoDataSizeInChars(), clang::ASTContext::getTypeSizeInChars(), clang::Expr::IgnoreParens(), clang::Type::isConstantSizeType(), clang::Type::isDependentType(), clang::Type::isFunctionType(), clang::Type::isVoidType(), clang::CharUnits::One(), clang::ASTContext::toCharUnitsFromBits(), and clang::TypeInfoChars::Width.

◆ VisitUnaryOperator()

Definition at line 5715 of file Compiler.cpp.

References E, clang::ASTContext::getLangOpts(), 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_FnPtr, clang::interp::PT_Ptr, and clang::T.

◆ visitVarDecl()

Creates and initializes a variable from the given decl.

Definition at line 4374 of file Compiler.cpp.

References clang::interp::InitLink::Decl(), clang::VarDecl::getInit(), clang::ValueDecl::getType(), clang::Init, clang::QualType::isConstQualified(), clang::VarDecl::isLocalVarDecl(), clang::QualType::isNull(), clang::VarDecl::isStaticLocal(), clang::interp::VarCreationState::NotCreated(), P, and clang::interp::Context::shouldBeGloballyIndexed().

◆ VisitVectorBinOp()

Definition at line 1352 of file Compiler.cpp.

References clang::interp::Add, clang::ASTContext::BoolTy, clang::interp::Div(), E, EMIT_ARITH_OP, clang::Type::getAs(), clang::BinaryOperator::getOpForCompoundAssignment(), clang::ASTContext::getPromotedIntegerType(), clang::Expr::getType(), clang::Initializing, clang::Type::isVectorType(), clang::interp::Mul(), clang::interp::PT_Bool, clang::interp::PT_Ptr, and clang::interp::Sub.

◆ VisitVectorUnaryOperator() ◆ visitWhileStmt() ◆ ArrayIndexScope< Emitter > ◆ DeclScope< Emitter > ◆ DestructorScope< Emitter > ◆ InitLink ◆ InitLinkScope< Emitter > ◆ InitStackScope< Emitter > ◆ LabelScope< Emitter > ◆ LocalScope< Emitter > ◆ LoopScope< Emitter > ◆ OptionScope< Emitter > ◆ SourceLocScope< Emitter > ◆ StmtExprScope< Emitter > ◆ SwitchScope< Emitter > ◆ VariableScope< Emitter > ◆ ArrayIndex ◆ BreakLabel ◆ BreakVarScope ◆ CaseLabels ◆ ContinueLabel ◆ ContinueVarScope ◆ Ctx ◆ DefaultLabel ◆ DiscardResult

Flag indicating if return value is to be discarded.

Definition at line 407 of file Compiler.h.

◆ Initializing ◆ InitializingDecl ◆ InitStack ◆ InitStackActive ◆ InStmtExpr ◆ Locals

Variable to storage mapping.

Definition at line 392 of file Compiler.h.

◆ OpaqueExprs ◆ P ◆ ReturnType

Type of the expression returned by the function.

Definition at line 420 of file Compiler.h.

◆ SourceLocDefaultExpr ◆ VarScope

The documentation for this class was generated from the following files:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4