Lines Matching refs:APValue
36 #include "clang/AST/APValue.h"
54 static bool IsGlobalLValue(APValue::LValueBase B);
61 static QualType getType(APValue::LValueBase B) {
71 APValue::BaseOrMemberType getAsBaseOrMember(APValue::LValuePathEntry E) {
72 APValue::BaseOrMemberType Value;
79 static const FieldDecl *getAsField(APValue::LValuePathEntry E) {
84 static const CXXRecordDecl *getAsBaseClass(APValue::LValuePathEntry E) {
89 static bool isVirtualBaseClass(APValue::LValuePathEntry E) {
97 ArrayRef<APValue::LValuePathEntry> Path,
152 typedef APValue::LValuePathEntry PathEntry;
163 SubobjectDesignator(ASTContext &Ctx, const APValue &V)
218 APValue::BaseOrMemberType Value(D, Virtual);
288 const APValue *Arguments;
290 typedef llvm::DenseMap<const Expr*, APValue> MapTy;
297 const APValue *Arguments);
364 typedef llvm::DenseMap<const OpaqueValueExpr*, APValue> MapTy;
379 APValue *EvaluatingDeclValue;
397 const APValue *getOpaqueValue(const OpaqueValueExpr *e) const {
403 void setEvaluatingDecl(const VarDecl *VD, APValue &Value) {
584 const APValue *Arguments)
613 const APValue &Arg = Frame->Arguments[ArgIndex];
674 void moveInto(APValue &v) const {
676 v = APValue(FloatReal, FloatImag);
678 v = APValue(IntReal, IntImag);
680 void setFrom(const APValue &v) {
695 APValue::LValueBase Base;
700 const APValue::LValueBase getLValueBase() const { return Base; }
707 void moveInto(APValue &V) const {
709 V = APValue(Base, Offset, APValue::NoLValuePath(), CallIndex);
711 V = APValue(Base, Offset, Designator.Entries,
714 void setFrom(ASTContext &Ctx, const APValue &V) {
722 void set(APValue::LValueBase B, unsigned I = 0) {
794 void moveInto(APValue &V) const {
795 V = APValue(getDecl(), isDerivedMember(), Path);
797 void setFrom(const APValue &V) {
880 static bool Evaluate(APValue &Result, EvalInfo &Info, const Expr *E);
881 static bool EvaluateInPlace(APValue &Result, EvalInfo &Info,
891 static bool EvaluateIntegerOrLValue(const Expr *E, APValue &Result,
907 static bool IsGlobalLValue(APValue::LValueBase B) {
959 static void NoteLValueLocation(EvalInfo &Info, APValue::LValueBase Base) {
976 APValue::LValueBase Base = LVal.getLValueBase();
1041 QualType Type, const APValue &Value) {
1104 static bool EvalPointerValueAsBool(const APValue &Value, bool &Result) {
1119 static bool HandleConversionToBool(const APValue &Val, bool &Result) {
1121 case APValue::Uninitialized:
1123 case APValue::Int:
1126 case APValue::Float:
1129 case APValue::ComplexInt:
1133 case APValue::ComplexFloat:
1137 case APValue::LValue:
1139 case APValue::MemberPointer:
1142 case APValue::Vector:
1143 case APValue::Array:
1144 case APValue::Struct:
1145 case APValue::Union:
1146 case APValue::AddrLabelDiff:
1150 llvm_unreachable("unknown APValue kind");
1156 APValue Val;
1222 APValue SVal;
1241 APValue &Elt = SVal.getVectorElt(i);
1415 CallStackFrame *Frame, APValue &Result) {
1480 /// Get the base index of the given base class within an APValue representing
1515 APValue &Obj, QualType ObjType,
1532 APValue *O = &Obj;
1548 // An array object is represented as either an Array APValue or as an
1553 Obj = APValue(ExtractStringLiteralCharacter(
1572 Obj = APValue(Index ? O->getComplexIntImag()
1576 Obj = APValue(Index ? O->getComplexFloatImag()
1633 APValue Tmp;
1709 const LValue &LVal, APValue &RVal) {
1862 RVal = APValue(Base, CharUnits::Zero(), APValue::NoLValuePath(), 0);
2026 static EvalStmtResult EvaluateStmt(APValue &Result, EvalInfo &Info,
2113 typedef SmallVector<APValue, 8> ArgVector;
2137 EvalInfo &Info, APValue &Result) {
2153 EvalInfo &Info, APValue &Result) {
2175 // For a trivial copy or move constructor, perform an APValue copy. This is
2189 Result = APValue(APValue::UninitStruct(), RD->getNumBases(),
2202 APValue *Value = &Result;
2221 Result = APValue(FD);
2242 *Value = APValue(FD);
2244 *Value = APValue(APValue::UninitStruct(), CD->getNumBases(),
2382 RetTy DerivedSuccess(const APValue &V, const Expr *E) {
2503 APValue Result;
2548 const APValue *Value = Info.getOpaqueValue(E);
2637 APValue Result;
2671 APValue Val;
2705 APValue RVal;
2719 APValue Scratch;
2739 bool Success(APValue::LValueBase B) {
2748 bool Success(const APValue &V, const Expr *E) {
2783 APValue RefValue;
2932 APValue V;
3063 bool Success(const APValue &V, const Expr *E) {
3197 APValue Value;
3265 bool Success(const APValue &V, const Expr *E) {
3343 APValue &Result;
3346 RecordExprEvaluator(EvalInfo &info, const LValue &This, APValue &Result)
3349 bool Success(const APValue &V, const Expr *E) {
3370 const LValue &This, APValue &Result) {
3373 Result = APValue(APValue::UninitStruct(), CD ? CD->getNumBases() : 0,
3416 Result = APValue((const FieldDecl*)0);
3422 Result = APValue(*I);
3445 APValue DerivedObject;
3452 APValue *Value = &DerivedObject;
3477 Result = APValue(Field);
3493 Result = APValue(APValue::UninitStruct(), 0,
3542 Result = APValue((FieldDecl*)0);
3544 Result = APValue(APValue::UninitStruct(), RD->getNumBases(),
3571 APValue &Result, EvalInfo &Info) {
3631 APValue &Result;
3634 VectorExprEvaluator(EvalInfo &info, APValue &Result)
3637 bool Success(const ArrayRef<APValue> &V, const Expr *E) {
3639 // FIXME: remove this APValue copy.
3640 Result = APValue(V.data(), V.size());
3643 bool Success(const APValue &V, const Expr *E) {
3661 static bool EvaluateVector(const Expr* E, APValue& Result, EvalInfo &Info) {
3675 APValue Val = APValue();
3680 Val = APValue(IntResult);
3685 Val = APValue(F);
3690 // Splat and create vector APValue.
3691 SmallVector<APValue, 4> Elts(NElts, Val);
3703 SmallVector<APValue, 4> Elts;
3716 Elts.push_back(APValue(APFloat(Elt, isIEESem)));
3725 Elts.push_back(APValue(APSInt(Elt, EltTy->isSignedIntegerType())));
3744 SmallVector<APValue, 4> Elements;
3755 APValue v;
3769 Elements.push_back(APValue(sInt));
3778 Elements.push_back(APValue(f));
3790 APValue ZeroElement;
3792 ZeroElement = APValue(Info.Ctx.MakeIntValue(0, EltTy));
3795 APValue(APFloat::getZero(Info.Ctx.getFloatTypeSemantics(EltTy)));
3797 SmallVector<APValue, 4> Elements(VT->getNumElements(), ZeroElement);
3814 APValue &Result;
3817 ArrayExprEvaluator(EvalInfo &Info, const LValue &This, APValue &Result)
3820 bool Success(const APValue &V, const Expr *E) {
3833 Result = APValue(APValue::UninitArray(), 0,
3850 APValue &Result, EvalInfo &Info) {
3866 APValue Val;
3873 Result = APValue(APValue::UninitArray(), E->getNumInits(),
3907 Result = APValue(APValue::UninitArray(), 0, CAT->getSize().getZExtValue());
3927 Result.getArrayFiller() = APValue((FieldDecl*)0);
3930 APValue(APValue::UninitStruct(), RD->getNumBases(),
3965 // either as an integer-valued APValue, or as an lvalue-valued APValue.
3971 APValue &Result;
3973 IntExprEvaluator(EvalInfo &info, APValue &result)
3976 bool Success(const llvm::APSInt &SI, const Expr *E, APValue &Result) {
3983 Result = APValue(SI);
3990 bool Success(const llvm::APInt &I, const Expr *E, APValue &Result) {
3995 Result = APValue(APSInt(I));
4004 bool Success(uint64_t Value, const Expr *E, APValue &Result) {
4007 Result = APValue(Info.Ctx.MakeIntValue(Value, E->getType()));
4018 bool Success(const APValue &V, const Expr *E) {
4105 static QualType GetObjectType(APValue::LValueBase B);
4119 static bool EvaluateIntegerOrLValue(const Expr *E, APValue &Result,
4126 APValue Val;
4255 APValue &V = Result.Val;
4256 if (V.getKind() == APValue::Int)
4278 QualType IntExprEvaluator::GetObjectType(APValue::LValueBase B) {
4470 APValue Val;
4507 APValue &FinalResult;
4510 DataRecursiveIntBinOpEvaluator(IntExprEvaluator &IntEval, APValue &Result)
4537 bool Success(uint64_t Value, const Expr *E, APValue &Result) {
4540 bool Success(const APSInt &Value, const Expr *E, APValue &Result) {
4559 const BinaryOperator *E, APValue &Result);
4564 Result.Val = APValue();
4623 const BinaryOperator *E, APValue &Result) {
4661 const APValue &LHSVal = LHSResult.Val;
4662 const APValue &RHSVal = RHSResult.Val;
4702 Result = APValue(LHSAddrExpr, RHSAddrExpr);
4962 Result = APValue(LHSAddrExpr, RHSAddrExpr);
5541 bool Success(const APValue &V, const Expr *e) {
5774 bool Success(const APValue &V, const Expr *e) {
6153 bool Success(const APValue &V, const Expr *e) { return true; }
6176 static bool Evaluate(APValue &Result, EvalInfo &Info, const Expr *E) {
6199 Result = APValue(F);
6242 /// EvaluateInPlace - Evaluate an expression in-place in an APValue. In some
6245 static bool EvaluateInPlace(APValue &Result, EvalInfo &Info, const LValue &This,
6266 static bool EvaluateAsRValue(EvalInfo &Info, const Expr *E, APValue &Result) {
6293 Result.Val = APValue(APSInt(L->getValue(),
6342 bool Expr::EvaluateAsInitializer(APValue &Value, const ASTContext &Ctx,
6827 APValue Result;
6864 bool Expr::isCXX11ConstantExpr(ASTContext &Ctx, APValue *Result,
6876 APValue Scratch;
6918 APValue Scratch;