clang 18.0.0git
|
Compilation context for expressions. More...
#include "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/AST/Interp/ByteCodeExprGen.h"
Protected Types | |
using | LabelTy = typename Emitter::LabelTy |
using | AddrTy = typename Emitter::AddrTy |
Protected Member Functions | |
bool | visitExpr (const Expr *E) override |
bool | visitDecl (const VarDecl *VD) override |
Toplevel visitDecl(). | |
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) |
std::optional< PrimType > | classify (const Expr *E) const |
Classifies a type. | |
std::optional< PrimType > | classify (QualType Ty) const |
PrimType | classifyPrim (QualType Ty) const |
Classifies a known primitive type. | |
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 . | |
bool | visitVarDecl (const VarDecl *VD) |
Creates and initializes a variable from the given decl. | |
bool | visitAPValue (const APValue &Val, PrimType ValType, const Expr *E) |
Visit an APValue. | |
bool | visitBool (const Expr *E) |
Visits an expression and converts it to a boolean. | |
bool | visitLocalInitializer (const Expr *Init, unsigned I) |
Visits an initializer for a local. | |
bool | visitGlobalInitializer (const Expr *Init, unsigned I) |
Visits an initializer for a global. | |
bool | visitThisInitializer (const Expr *I) |
Visits a delegated initializer. | |
bool | visitInitList (ArrayRef< const Expr * > Inits, 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< unsigned > | allocateLocal (DeclTy &&Decl, bool IsExtended=false) |
Allocates a space storing a local given its type. | |
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 | Initializing = false |
Flag inidicating if we're initializing an already created variable. | |
bool | GlobalDecl = false |
Flag indicating if we're initializing a global variable. | |
Friends | |
class | VariableScope< Emitter > |
class | LocalScope< Emitter > |
class | DestructorScope< Emitter > |
class | RecordScope< Emitter > |
class | DeclScope< Emitter > |
class | OptionScope< Emitter > |
class | ArrayIndexScope< Emitter > |
class | SourceLocScope< Emitter > |
Additional Inherited Members | |
![]() | |
ParamTys | P { return RetTy() |
Compilation context for expressions.
Definition at line 42 of file ByteCodeExprGen.h.
|
protected |
Definition at line 47 of file ByteCodeExprGen.h.
|
protected |
Definition at line 46 of file ByteCodeExprGen.h.
|
inline |
Initializes the compiler and the backend emitter.
Definition at line 57 of file ByteCodeExprGen.h.
|
protected |
Allocates a space storing a local given its type.
Definition at line 2032 of file ByteCodeExprGen.cpp.
References clang::ValueDecl::getType(), clang::Expr::getType(), clang::QualType::getTypePtr(), clang::Init, clang::interp::Descriptor::InlineDescMD, clang::QualType::isConstQualified(), and P.
|
protected |
Creates a local primitive value.
Definition at line 2007 of file ByteCodeExprGen.cpp.
References clang::interp::Descriptor::InlineDescMD, and P.
|
inlineprotected |
Classifies a type.
Definition at line 131 of file ByteCodeExprGen.h.
References clang::interp::ByteCodeExprGen< Emitter >::classify(), clang::Expr::getType(), clang::Type::isFunctionType(), clang::Expr::isGLValue(), clang::interp::PT_FnPtr, and clang::interp::PT_Ptr.
Referenced by clang::interp::ByteCodeExprGen< Emitter >::classify(), and clang::interp::ByteCodeExprGen< Emitter >::classifyPrim().
|
inlineprotected |
Definition at line 140 of file ByteCodeExprGen.h.
References clang::interp::Context::classify(), and clang::interp::ByteCodeExprGen< Emitter >::Ctx.
|
inlineprotected |
Classifies a known primitive type.
Definition at line 145 of file ByteCodeExprGen.h.
References clang::interp::ByteCodeExprGen< Emitter >::classify().
Just pass evaluation on to E
.
This leaves all the parsing flags intact.
Definition at line 1633 of file ByteCodeExprGen.cpp.
References clang::Expr::containsErrors().
Evaluates an expression for side effects and discards the result.
Definition at line 1623 of file ByteCodeExprGen.cpp.
References clang::Expr::containsErrors().
|
protected |
Emits scope cleanup instructions.
Definition at line 2638 of file ByteCodeExprGen.cpp.
References clang::C.
|
protected |
Definition at line 2089 of file ByteCodeExprGen.cpp.
|
protected |
Definition at line 2084 of file ByteCodeExprGen.cpp.
References P.
Returns a record from a record or pointer type.
Definition at line 2077 of file ByteCodeExprGen.cpp.
|
protected |
Returns a record type from a record or pointer type.
Definition at line 2070 of file ByteCodeExprGen.cpp.
References clang::Type::getAs(), and clang::Type::getPointeeType().
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 1643 of file ByteCodeExprGen.cpp.
References clang::Expr::containsErrors(), clang::Expr::getType(), clang::Expr::isGLValue(), and clang::Type::isVoidType().
bool ByteCodeExprGen::VisitAbstractConditionalOperator | ( | const AbstractConditionalOperator * | E | ) |
Definition at line 898 of file ByteCodeExprGen.cpp.
References clang::Condition, clang::AbstractConditionalOperator::getCond(), clang::AbstractConditionalOperator::getFalseExpr(), and clang::AbstractConditionalOperator::getTrueExpr().
|
protected |
Visit an APValue.
Definition at line 2204 of file ByteCodeExprGen.cpp.
References clang::APValue::getInt(), clang::APValue::getLValueBase(), clang::APValue::isInt(), and clang::APValue::isLValue().
|
protected |
Pointer to the array(not the element!) must be on the stack when calling this.
Definition at line 620 of file ByteCodeExprGen.cpp.
References clang::Init.
bool ByteCodeExprGen::VisitArrayInitIndexExpr | ( | const ArrayInitIndexExpr * | E | ) |
Definition at line 820 of file ByteCodeExprGen.cpp.
bool ByteCodeExprGen::VisitArrayInitLoopExpr | ( | const ArrayInitLoopExpr * | E | ) |
Definition at line 830 of file ByteCodeExprGen.cpp.
References clang::ArrayInitLoopExpr::getArraySize(), clang::ArrayInitLoopExpr::getCommonExpr(), and clang::ArrayInitLoopExpr::getSubExpr().
bool ByteCodeExprGen::VisitArraySubscriptExpr | ( | const ArraySubscriptExpr * | E | ) |
Definition at line 538 of file ByteCodeExprGen.cpp.
References clang::ArraySubscriptExpr::getBase(), and clang::ArraySubscriptExpr::getIdx().
bool ByteCodeExprGen::VisitBinaryOperator | ( | const BinaryOperator * | E | ) |
Definition at line 257 of file ByteCodeExprGen.cpp.
References clang::BinaryOperator::getLHS(), clang::BinaryOperator::getOpcode(), clang::BinaryOperator::getRHS(), clang::Expr::getType(), clang::BinaryOperator::isCommaOp(), clang::Type::isFloatingType(), clang::BinaryOperator::isLogicalOp(), clang::BinaryOperator::isPtrMemOp(), clang::Type::isVoidType(), LT, clang::interp::PT_Bool, clang::interp::PT_Ptr, and clang::Expr::refersToBitField().
Visits an expression and converts it to a boolean.
Definition at line 1681 of file ByteCodeExprGen.cpp.
References clang::Expr::getType(), clang::interp::PT_Bool, clang::interp::PT_Float, clang::interp::PT_FnPtr, and clang::interp::PT_Ptr.
Definition at line 2220 of file ByteCodeExprGen.cpp.
References clang::CallExpr::arguments(), clang::Func, clang::CallExpr::getCallReturnType(), clang::CallExpr::getDirectCallee(), and clang::Type::isVoidType().
Definition at line 2246 of file ByteCodeExprGen.cpp.
References clang::CallExpr::arguments(), clang::Func, clang::CallExpr::getBuiltinCallee(), clang::CallExpr::getCallee(), clang::CallExpr::getCallReturnType(), clang::CallExpr::getDirectCallee(), and clang::Type::isVoidType().
Definition at line 77 of file ByteCodeExprGen.cpp.
References dereference(), clang::CastExpr::getCastKind(), clang::CastExpr::getSubExpr(), clang::Expr::getType(), clang::interp::PT_IntAP, and clang::interp::PT_IntAPS.
bool ByteCodeExprGen::VisitCharacterLiteral | ( | const CharacterLiteral * | E | ) |
Definition at line 987 of file ByteCodeExprGen.cpp.
References clang::CharacterLiteral::getValue().
bool ByteCodeExprGen::VisitCompoundAssignOperator | ( | const CompoundAssignOperator * | E | ) |
Definition at line 1104 of file ByteCodeExprGen.cpp.
References clang::CompoundAssignOperator::getComputationLHSType(), clang::CompoundAssignOperator::getComputationResultType(), clang::BinaryOperator::getLHS(), clang::BinaryOperator::getOpcode(), clang::BinaryOperator::getRHS(), clang::Expr::getType(), clang::Type::isFloatingType(), clang::Type::isPointerType(), LT, clang::interp::PT_Float, and clang::Expr::refersToBitField().
bool ByteCodeExprGen::VisitCompoundLiteralExpr | ( | const CompoundLiteralExpr * | E | ) |
Definition at line 1309 of file ByteCodeExprGen.cpp.
References clang::CompoundLiteralExpr::getInitializer(), clang::Expr::getType(), clang::Init, clang::CompoundLiteralExpr::isFileScope(), and P.
bool ByteCodeExprGen::VisitConstantExpr | ( | const ConstantExpr * | E | ) |
Definition at line 700 of file ByteCodeExprGen.cpp.
References clang::ConstantExpr::getAPValueResult(), clang::FullExpr::getSubExpr(), clang::Expr::getType(), and clang::ConstantExpr::hasAPValueResult().
bool ByteCodeExprGen::VisitCXXBindTemporaryExpr | ( | const CXXBindTemporaryExpr * | E | ) |
Definition at line 1303 of file ByteCodeExprGen.cpp.
References clang::CXXBindTemporaryExpr::getSubExpr().
bool ByteCodeExprGen::VisitCXXBoolLiteralExpr | ( | const CXXBoolLiteralExpr * | E | ) |
Definition at line 2357 of file ByteCodeExprGen.cpp.
References clang::CXXBoolLiteralExpr::getValue().
bool ByteCodeExprGen::VisitCXXConstructExpr | ( | const CXXConstructExpr * | E | ) |
Definition at line 1426 of file ByteCodeExprGen.cpp.
References clang::CXXConstructExpr::arguments(), clang::Func, clang::CXXConstructExpr::getConstructor(), clang::ConstantArrayType::getSize(), clang::Expr::getType(), clang::Type::isArrayType(), clang::Type::isRecordType(), clang::FunctionDecl::isTrivial(), and clang::CXXConstructExpr::requiresZeroInitialization().
bool ByteCodeExprGen::VisitCXXDefaultArgExpr | ( | const CXXDefaultArgExpr * | E | ) |
Definition at line 2344 of file ByteCodeExprGen.cpp.
References clang::CXXDefaultArgExpr::getExpr().
bool ByteCodeExprGen::VisitCXXDefaultInitExpr | ( | const CXXDefaultInitExpr * | E | ) |
Definition at line 2333 of file ByteCodeExprGen.cpp.
References clang::CXXDefaultInitExpr::getExpr(), and clang::Expr::getType().
bool ByteCodeExprGen::VisitCXXNoexceptExpr | ( | const CXXNoexceptExpr * | E | ) |
Definition at line 1417 of file ByteCodeExprGen.cpp.
References clang::Expr::getType(), clang::CXXNoexceptExpr::getValue(), and clang::Type::isBooleanType().
bool ByteCodeExprGen::VisitCXXNullPtrLiteralExpr | ( | const CXXNullPtrLiteralExpr * | E | ) |
Definition at line 2366 of file ByteCodeExprGen.cpp.
bool ByteCodeExprGen::VisitCXXParenListInitExpr | ( | const CXXParenListInitExpr * | E | ) |
Definition at line 679 of file ByteCodeExprGen.cpp.
References clang::CXXParenListInitExpr::getInitExprs(), clang::Expr::getType(), clang::Init, and clang::Type::isRecordType().
bool ByteCodeExprGen::VisitCXXReinterpretCastExpr | ( | const CXXReinterpretCastExpr * | E | ) |
Definition at line 1408 of file ByteCodeExprGen.cpp.
References clang::CastExpr::getSubExpr().
bool ByteCodeExprGen::VisitCXXScalarValueInitExpr | ( | const CXXScalarValueInitExpr * | E | ) |
Definition at line 1608 of file ByteCodeExprGen.cpp.
References clang::Expr::getType(), and clang::Type::isVoidType().
bool ByteCodeExprGen::VisitCXXThisExpr | ( | const CXXThisExpr * | E | ) |
Definition at line 2386 of file ByteCodeExprGen.cpp.
bool ByteCodeExprGen::VisitCXXThrowExpr | ( | const CXXThrowExpr * | E | ) |
Definition at line 1400 of file ByteCodeExprGen.cpp.
References clang::CXXThrowExpr::getSubExpr().
Toplevel visitDecl().
We get here from evaluateAsInitializer(). We need to evaluate the initializer and return its value.
Definition at line 2111 of file ByteCodeExprGen.cpp.
References clang::ValueDecl::getType(), clang::Decl::isInvalidDecl(), P, and clang::interp::Context::shouldBeGloballyIndexed().
bool ByteCodeExprGen::VisitDeclRefExpr | ( | const DeclRefExpr * | E | ) |
Definition at line 2566 of file ByteCodeExprGen.cpp.
References clang::VarDecl::getAnyInitializer(), clang::DeclRefExpr::getDecl(), clang::ValueDecl::getType(), clang::interp::Descriptor::getType(), clang::VarDecl::hasGlobalStorage(), clang::QualType::isConstQualified(), clang::Type::isReferenceType(), P, and clang::interp::PT_Ptr.
Definition at line 2094 of file ByteCodeExprGen.cpp.
References clang::Expr::getType(), and clang::Type::isVoidType().
bool ByteCodeExprGen::VisitExprWithCleanups | ( | const ExprWithCleanups * | E | ) |
Definition at line 1222 of file ByteCodeExprGen.cpp.
References clang::ExprWithCleanups::getNumObjects(), and clang::FullExpr::getSubExpr().
bool ByteCodeExprGen::VisitFloatCompoundAssignOperator | ( | const CompoundAssignOperator * | E | ) |
Definition at line 995 of file ByteCodeExprGen.cpp.
References clang::CompoundAssignOperator::getComputationLHSType(), clang::CompoundAssignOperator::getComputationResultType(), clang::BinaryOperator::getLHS(), clang::BinaryOperator::getOpcode(), clang::BinaryOperator::getRHS(), clang::Expr::getType(), clang::Type::isFloatingType(), and LT.
bool ByteCodeExprGen::VisitFloatingLiteral | ( | const FloatingLiteral * | E | ) |
Definition at line 244 of file ByteCodeExprGen.cpp.
References clang::FloatingLiteral::getValue().
|
inlineprotected |
Visits an initializer for a global.
Definition at line 186 of file ByteCodeExprGen.h.
References clang::Init, and clang::interp::ByteCodeExprGen< Emitter >::visitInitializer().
bool ByteCodeExprGen::VisitGNUNullExpr | ( | const GNUNullExpr * | E | ) |
Definition at line 2375 of file ByteCodeExprGen.cpp.
References clang::Expr::getType(), and clang::Type::isIntegerType().
bool ByteCodeExprGen::VisitImplicitValueInitExpr | ( | const ImplicitValueInitExpr * | E | ) |
Definition at line 505 of file ByteCodeExprGen.cpp.
References clang::Type::getAsArrayTypeUnsafe(), clang::Expr::getType(), clang::Type::isArrayType(), clang::Type::isIncompleteArrayType(), 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 1669 of file ByteCodeExprGen.cpp.
References clang::Expr::containsErrors(), and clang::Expr::getType().
Referenced by clang::interp::ByteCodeExprGen< Emitter >::visitGlobalInitializer(), clang::interp::ByteCodeExprGen< Emitter >::visitLocalInitializer(), and clang::interp::ByteCodeExprGen< Emitter >::visitThisInitializer().
|
protected |
Definition at line 559 of file ByteCodeExprGen.cpp.
References clang::interp::Record::getBase(), clang::interp::Record::getField(), clang::Expr::getType(), clang::Init, clang::interp::Record::Field::isBitField(), clang::Type::isRecordType(), and clang::interp::Record::Field::Offset.
bool ByteCodeExprGen::VisitInitListExpr | ( | const InitListExpr * | E | ) |
Definition at line 641 of file ByteCodeExprGen.cpp.
References clang::InitListExpr::getNumInits(), clang::Expr::getType(), clang::Init, clang::InitListExpr::inits(), clang::Type::isArrayType(), and clang::Type::isRecordType().
bool ByteCodeExprGen::VisitIntegerLiteral | ( | const IntegerLiteral * | E | ) |
Definition at line 236 of file ByteCodeExprGen.cpp.
References clang::interp::LE().
bool ByteCodeExprGen::VisitLambdaExpr | ( | const LambdaExpr * | E | ) |
Definition at line 1355 of file ByteCodeExprGen.cpp.
References clang::LambdaExpr::capture_init_begin(), clang::interp::Record::fields(), clang::LambdaExpr::getLambdaClass(), clang::Init, and P.
|
inlineprotected |
Visits an initializer for a local.
Definition at line 175 of file ByteCodeExprGen.h.
References clang::Init, and clang::interp::ByteCodeExprGen< Emitter >::visitInitializer().
bool ByteCodeExprGen::VisitLogicalBinOp | ( | const BinaryOperator * | E | ) |
Definition at line 444 of file ByteCodeExprGen.cpp.
References clang::BinaryOperator::getLHS(), clang::BinaryOperator::getOpcode(), clang::BinaryOperator::getRHS(), clang::Expr::getType(), clang::BinaryOperator::isLogicalOp(), and clang::interp::PT_Bool.
bool ByteCodeExprGen::VisitMaterializeTemporaryExpr | ( | const MaterializeTemporaryExpr * | E | ) |
Definition at line 1232 of file ByteCodeExprGen.cpp.
References clang::MaterializeTemporaryExpr::getLifetimeExtendedTemporaryDecl(), clang::MaterializeTemporaryExpr::getStorageDuration(), clang::MaterializeTemporaryExpr::getSubExpr(), IsStatic, P, and clang::SD_Static.
bool ByteCodeExprGen::VisitMemberExpr | ( | const MemberExpr * | E | ) |
Definition at line 793 of file ByteCodeExprGen.cpp.
References clang::interp::Record::Field::Decl, clang::MemberExpr::getBase(), clang::interp::Record::getField(), clang::MemberExpr::getMemberDecl(), clang::DeclContext::getParent(), clang::ValueDecl::getType(), clang::Type::isReferenceType(), clang::Member, clang::interp::Record::Field::Offset, and clang::interp::PT_Ptr.
bool ByteCodeExprGen::VisitOffsetOfExpr | ( | const OffsetOfExpr * | E | ) |
Definition at line 1573 of file ByteCodeExprGen.cpp.
References clang::OffsetOfNode::Array, clang::OffsetOfExpr::getComponent(), clang::OffsetOfExpr::getIndexExpr(), clang::OffsetOfExpr::getNumComponents(), clang::Expr::getType(), Node, and clang::interp::PT_Sint64.
bool ByteCodeExprGen::VisitOpaqueValueExpr | ( | const OpaqueValueExpr * | E | ) |
Definition at line 863 of file ByteCodeExprGen.cpp.
References clang::OpaqueValueExpr::getSourceExpr(), and clang::interp::PT_Ptr.
Definition at line 252 of file ByteCodeExprGen.cpp.
References clang::ParenExpr::getSubExpr().
bool ByteCodeExprGen::VisitPointerArithBinOp | ( | const BinaryOperator * | E | ) |
Perform addition/subtraction of a pointer and an integer or subtraction of two pointers.
Definition at line 396 of file ByteCodeExprGen.cpp.
References clang::BinaryOperator::getLHS(), clang::BinaryOperator::getOpcode(), clang::BinaryOperator::getRHS(), clang::Expr::getType(), clang::Type::isIntegerType(), clang::Type::isPointerType(), and LT.
bool ByteCodeExprGen::VisitPointerCompoundAssignOperator | ( | const CompoundAssignOperator * | E | ) |
Definition at line 1069 of file ByteCodeExprGen.cpp.
References clang::BinaryOperator::getLHS(), clang::BinaryOperator::getOpcode(), clang::BinaryOperator::getRHS(), clang::Expr::getType(), LT, and clang::interp::PT_Ptr.
bool ByteCodeExprGen::VisitPredefinedExpr | ( | const PredefinedExpr * | E | ) |
Definition at line 1391 of file ByteCodeExprGen.cpp.
References clang::PredefinedExpr::getFunctionName().
bool ByteCodeExprGen::VisitSizeOfPackExpr | ( | const SizeOfPackExpr * | E | ) |
Definition at line 1619 of file ByteCodeExprGen.cpp.
References clang::SizeOfPackExpr::getPackLength().
bool ByteCodeExprGen::VisitSourceLocExpr | ( | const SourceLocExpr * | E | ) |
Definition at line 1517 of file ByteCodeExprGen.cpp.
References clang::interp::Record::Field::Decl, clang::SourceLocExpr::EvaluateInContext(), clang::interp::Record::getField(), clang::APValue::getInt(), clang::APValue::getLValueBase(), clang::APValue::getLValuePath(), clang::interp::Record::getNumFields(), clang::ValueDecl::getType(), clang::Expr::getType(), clang::APValue::isInt(), clang::Type::isIntegerType(), clang::APValue::isLValue(), clang::Type::isPointerType(), clang::interp::Record::Field::Offset, P, and V.
bool ByteCodeExprGen::VisitStringLiteral | ( | const StringLiteral * | E | ) |
Definition at line 930 of file ByteCodeExprGen.cpp.
References clang::StringLiteral::getCharByteWidth(), clang::StringLiteral::getCodeUnit(), clang::StringLiteral::getLength(), clang::ConstantArrayType::getSize(), clang::Expr::getType(), and P.
bool ByteCodeExprGen::VisitSubstNonTypeTemplateParmExpr | ( | const SubstNonTypeTemplateParmExpr * | E | ) |
Definition at line 694 of file ByteCodeExprGen.cpp.
References clang::SubstNonTypeTemplateParmExpr::getReplacement().
|
inlineprotected |
Visits a delegated initializer.
Definition at line 201 of file ByteCodeExprGen.h.
References clang::interp::ByteCodeExprGen< Emitter >::visitInitializer().
bool ByteCodeExprGen::VisitTypeTraitExpr | ( | const TypeTraitExpr * | E | ) |
Definition at line 1348 of file ByteCodeExprGen.cpp.
References clang::TypeTraitExpr::getValue().
bool ByteCodeExprGen::VisitUnaryExprOrTypeTraitExpr | ( | const UnaryExprOrTypeTraitExpr * | E | ) |
Definition at line 733 of file ByteCodeExprGen.cpp.
References AlignOfType(), clang::UnaryExprOrTypeTraitExpr::getArgumentExpr(), clang::ASTContext::getDeclAlign(), clang::UnaryExprOrTypeTraitExpr::getKind(), clang::Expr::getType(), clang::UnaryExprOrTypeTraitExpr::getTypeOfArgument(), clang::ASTContext::getTypeSizeInChars(), clang::Expr::IgnoreParens(), clang::UnaryExprOrTypeTraitExpr::isArgumentType(), clang::Type::isConstantSizeType(), clang::Type::isDependentType(), clang::Type::isFunctionType(), clang::Type::isVoidType(), and clang::CharUnits::One().
bool ByteCodeExprGen::VisitUnaryOperator | ( | const UnaryOperator * | E | ) |
Definition at line 2397 of file ByteCodeExprGen.cpp.
References dereference(), clang::UnaryOperator::getOpcode(), clang::UnaryOperator::getSubExpr(), clang::Expr::getType(), clang::interp::PT_Bool, clang::interp::PT_Float, and clang::interp::PT_Ptr.
Creates and initializes a variable from the given decl.
Definition at line 2149 of file ByteCodeExprGen.cpp.
References clang::VarDecl::getInit(), clang::ValueDecl::getType(), clang::Init, clang::QualType::isConstQualified(), clang::QualType::isNull(), P, and clang::interp::Context::shouldBeGloballyIndexed().
|
friend |
Definition at line 219 of file ByteCodeExprGen.h.
Definition at line 219 of file ByteCodeExprGen.h.
|
friend |
Definition at line 219 of file ByteCodeExprGen.h.
|
friend |
Definition at line 219 of file ByteCodeExprGen.h.
|
friend |
Definition at line 219 of file ByteCodeExprGen.h.
|
friend |
Definition at line 219 of file ByteCodeExprGen.h.
|
friend |
Definition at line 219 of file ByteCodeExprGen.h.
|
friend |
Definition at line 219 of file ByteCodeExprGen.h.
|
protected |
Current argument index. Needed to emit ArrayInitIndexExpr.
Definition at line 303 of file ByteCodeExprGen.h.
Referenced by clang::interp::ArrayIndexScope< Emitter >::ArrayIndexScope().
|
protected |
Current compilation context.
Definition at line 50 of file ByteCodeExprGen.h.
Referenced by clang::interp::ByteCodeExprGen< Emitter >::classify().
|
protected |
Flag indicating if return value is to be discarded.
Definition at line 309 of file ByteCodeExprGen.h.
Referenced by clang::interp::OptionScope< Emitter >::OptionScope().
|
protected |
Flag indicating if we're initializing a global variable.
Definition at line 316 of file ByteCodeExprGen.h.
|
protected |
Flag inidicating if we're initializing an already created variable.
This is set in visitInitializer().
Definition at line 313 of file ByteCodeExprGen.h.
Referenced by clang::interp::OptionScope< Emitter >::OptionScope().
|
protected |
Variable to storage mapping.
Definition at line 294 of file ByteCodeExprGen.h.
|
protected |
OpaqueValueExpr to location mapping.
Definition at line 297 of file ByteCodeExprGen.h.
|
protected |
Program to link to.
Definition at line 52 of file ByteCodeExprGen.h.
|
protected |
DefaultInit- or DefaultArgExpr, needed for SourceLocExpr.
Definition at line 306 of file ByteCodeExprGen.h.
Referenced by clang::interp::SourceLocScope< Emitter >::SourceLocScope().
|
protected |
Current scope.
Definition at line 300 of file ByteCodeExprGen.h.
Referenced by clang::interp::VariableScope< Emitter >::VariableScope().