Lines Matching refs:APValue
55 static bool IsGlobalLValue(APValue::LValueBase B);
62 static QualType getType(APValue::LValueBase B) { in getType()
90 APValue::BaseOrMemberType getAsBaseOrMember(APValue::LValuePathEntry E) { in getAsBaseOrMember()
91 APValue::BaseOrMemberType Value; in getAsBaseOrMember()
98 static const FieldDecl *getAsField(APValue::LValuePathEntry E) { in getAsField()
103 static const CXXRecordDecl *getAsBaseClass(APValue::LValuePathEntry E) { in getAsBaseClass()
108 static bool isVirtualBaseClass(APValue::LValuePathEntry E) { in isVirtualBaseClass()
116 ArrayRef<APValue::LValuePathEntry> Path, in findMostDerivedSubobject()
171 typedef APValue::LValuePathEntry PathEntry;
182 SubobjectDesignator(ASTContext &Ctx, const APValue &V) in SubobjectDesignator()
237 APValue::BaseOrMemberType Value(D, Virtual); in addDeclUnchecked()
307 APValue *Arguments;
311 typedef std::map<const void*, APValue> MapTy;
318 APValue *Arguments);
321 APValue *getTemporary(const void *Key) { in getTemporary()
325 APValue &createTemporary(const void *Key, bool IsLifetimeExtended);
380 llvm::PointerIntPair<APValue*, 1, bool> Value;
383 Cleanup(APValue *Val, bool IsLifetimeExtended) in Cleanup()
388 *Value.getPointer() = APValue(); in endLifetime()
436 APValue::LValueBase EvaluatingDecl;
440 APValue *EvaluatingDeclValue;
463 void setEvaluatingDecl(APValue::LValueBase Base, APValue &Value) { in setEvaluatingDecl()
693 APValue *Arguments) in CallStackFrame()
706 APValue &CallStackFrame::createTemporary(const void *Key, in createTemporary()
708 APValue &Result = Temporaries[Key]; in createTemporary()
767 void moveInto(APValue &v) const { in moveInto()
769 v = APValue(FloatReal, FloatImag); in moveInto()
771 v = APValue(IntReal, IntImag); in moveInto()
773 void setFrom(const APValue &v) { in setFrom()
788 APValue::LValueBase Base;
793 const APValue::LValueBase getLValueBase() const { return Base; } in getLValueBase()
800 void moveInto(APValue &V) const { in moveInto()
802 V = APValue(Base, Offset, APValue::NoLValuePath(), CallIndex); in moveInto()
804 V = APValue(Base, Offset, Designator.Entries, in moveInto()
807 void setFrom(ASTContext &Ctx, const APValue &V) { in setFrom()
815 void set(APValue::LValueBase B, unsigned I = 0) { in set()
887 void moveInto(APValue &V) const { in moveInto()
888 V = APValue(getDecl(), isDerivedMember(), Path); in moveInto()
890 void setFrom(const APValue &V) { in setFrom()
966 static bool Evaluate(APValue &Result, EvalInfo &Info, const Expr *E);
967 static bool EvaluateInPlace(APValue &Result, EvalInfo &Info,
976 static bool EvaluateIntegerOrLValue(const Expr *E, APValue &Result,
980 static bool EvaluateAtomic(const Expr *E, APValue &Result, EvalInfo &Info);
997 APValue Val; in describeCall()
1012 const APValue &Arg = Frame->Arguments[ArgIndex]; in describeCall()
1026 APValue Scratch; in EvaluateIgnoredValue()
1048 static bool IsGlobalLValue(APValue::LValueBase B) { in IsGlobalLValue()
1104 static void NoteLValueLocation(EvalInfo &Info, APValue::LValueBase Base) { in NoteLValueLocation()
1121 APValue::LValueBase Base = LVal.getLValueBase(); in CheckLValueConstantExpression()
1202 QualType Type, const APValue &Value) { in CheckConstantExpression()
1274 static bool EvalPointerValueAsBool(const APValue &Value, bool &Result) { in EvalPointerValueAsBool()
1289 static bool HandleConversionToBool(const APValue &Val, bool &Result) { in HandleConversionToBool()
1291 case APValue::Uninitialized: in HandleConversionToBool()
1293 case APValue::Int: in HandleConversionToBool()
1296 case APValue::Float: in HandleConversionToBool()
1299 case APValue::ComplexInt: in HandleConversionToBool()
1303 case APValue::ComplexFloat: in HandleConversionToBool()
1307 case APValue::LValue: in HandleConversionToBool()
1309 case APValue::MemberPointer: in HandleConversionToBool()
1312 case APValue::Vector: in HandleConversionToBool()
1313 case APValue::Array: in HandleConversionToBool()
1314 case APValue::Struct: in HandleConversionToBool()
1315 case APValue::Union: in HandleConversionToBool()
1316 case APValue::AddrLabelDiff: in HandleConversionToBool()
1326 APValue Val; in EvaluateAsBooleanCondition()
1390 APValue &Value, const FieldDecl *FD) { in truncateBitfieldValue()
1412 APValue SVal; in EvalAndBitcastToAPInt()
1431 APValue &Elt = SVal.getVectorElt(i); in EvalAndBitcastToAPInt()
1784 APValue *&Result) { in evaluateVarDeclInit()
1891 APValue &Result) { in expandStringLiteral()
1900 Result = APValue(APValue::UninitArray(), in expandStringLiteral()
1905 Result.getArrayFiller() = APValue(Value); in expandStringLiteral()
1908 Result.getArrayInitializedElt(I) = APValue(Value); in expandStringLiteral()
1913 static void expandArray(APValue &Array, unsigned Index) { in expandArray()
1923 APValue NewValue(APValue::UninitArray(), NewElts, Size); in expandArray()
1945 APValue *Value;
1950 CompleteObject(APValue *Value, QualType Type) in CompleteObject()
1975 APValue *O = Obj.Value; in findSubobject()
2121 APValue &Result;
2127 bool found(APValue &Subobj, QualType SubobjType) { in found()
2132 Result = APValue(Value); in found()
2136 Result = APValue(Value); in found()
2139 bool foundString(APValue &Subobj, QualType SubobjType, uint64_t Character) { in foundString()
2140 Result = APValue(extractStringLiteralCharacter( in foundString()
2153 APValue &Result) { in extractSubobject()
2161 APValue &NewVal;
2177 bool found(APValue &Subobj, QualType SubobjType) { in found()
2201 bool foundString(APValue &Subobj, QualType SubobjType, uint64_t Character) { in foundString()
2213 APValue &NewVal) { in modifySubobject()
2308 APValue *BaseVal = 0; in findCompleteObject()
2477 const LValue &LVal, APValue &RVal) { in handleLValueToRValueConversion()
2494 APValue Lit; in handleLValueToRValueConversion()
2503 APValue Str(Base, CharUnits::Zero(), APValue::NoLValuePath(), 0); in handleLValueToRValueConversion()
2515 QualType LValType, APValue &Val) { in handleAssignment()
2539 const APValue &RHS;
2555 bool found(APValue &Subobj, QualType SubobjType) { in found()
2557 case APValue::Int: in found()
2559 case APValue::Float: in found()
2561 case APValue::ComplexInt: in found()
2562 case APValue::ComplexFloat: in found()
2566 case APValue::LValue: in found()
2599 bool foundPointer(APValue &Subobj, QualType SubobjType) { in foundPointer()
2624 bool foundString(APValue &Subobj, QualType SubobjType, uint64_t Character) { in foundString()
2636 BinaryOperatorKind Opcode, const APValue &RVal) { in handleCompoundAssignment()
2656 APValue *Old;
2670 bool found(APValue &Subobj, QualType SubobjType) { in found()
2679 case APValue::Int: in found()
2681 case APValue::Float: in found()
2683 case APValue::ComplexInt: in found()
2687 case APValue::ComplexFloat: in found()
2691 case APValue::LValue: in found()
2710 if (Old) *Old = APValue(Value); in found()
2748 if (Old) *Old = APValue(Value); in found()
2757 bool foundPointer(APValue &Subobj, QualType SubobjType) { in foundPointer()
2777 bool foundString(APValue &Subobj, QualType SubobjType, uint64_t Character) { in foundString()
2785 QualType LValType, bool IsIncrement, APValue *Old) { in handleIncDec()
2989 APValue &Val = Info.CurrentCall->createTemporary(VD, true); in EvaluateDecl()
2994 Val = APValue(); in EvaluateDecl()
3001 Val = APValue(); in EvaluateDecl()
3018 static EvalStmtResult EvaluateStmt(APValue &Result, EvalInfo &Info,
3022 static EvalStmtResult EvaluateLoopBody(APValue &Result, EvalInfo &Info, in EvaluateLoopBody()
3041 static EvalStmtResult EvaluateSwitch(APValue &Result, EvalInfo &Info, in EvaluateSwitch()
3098 static EvalStmtResult EvaluateStmt(APValue &Result, EvalInfo &Info, in EvaluateStmt()
3436 typedef SmallVector<APValue, 8> ArgVector;
3460 EvalInfo &Info, APValue &Result) { in HandleFunctionCall()
3479 APValue RHSValue; in HandleFunctionCall()
3503 EvalInfo &Info, APValue &Result) { in HandleConstructorCall()
3541 Result = APValue(APValue::UninitStruct(), RD->getNumBases(), in HandleConstructorCall()
3558 APValue *Value = &Result; in HandleConstructorCall()
3580 Result = APValue(FD); in HandleConstructorCall()
3601 *Value = APValue(FD); in HandleConstructorCall()
3603 *Value = APValue(APValue::UninitStruct(), CD->getNumBases(), in HandleConstructorCall()
3643 RetTy DerivedSuccess(const APValue &V, const Expr *E) { in DerivedSuccess()
3766 APValue Result; in VisitBinaryOperator()
3812 if (APValue *Value = Info.CurrentCall->getTemporary(E)) in VisitOpaqueValueExpr()
3900 APValue Result; in VisitCallExpr()
3934 APValue Val; in VisitMemberExpr()
3950 APValue Result; in VisitMemberExpr()
3961 APValue AtomicVal; in VisitCastExpr()
3975 APValue RVal; in VisitCastExpr()
4000 APValue RVal; in VisitUnaryPostIncDec()
4028 APValue ReturnValue; in VisitStmtExpr()
4062 bool Success(APValue::LValueBase B) { in Success()
4071 bool Success(const APValue &V, const Expr *E) { in Success()
4108 APValue RefValue; in VisitMemberExpr()
4262 APValue *V; in VisitVarDecl()
4289 APValue *Value; in VisitMaterializeTemporaryExpr()
4292 *Value = APValue(); in VisitMaterializeTemporaryExpr()
4306 *Value = APValue(); in VisitMaterializeTemporaryExpr()
4435 APValue RHS; in VisitCompoundAssignOperator()
4457 APValue NewVal; in VisitBinAssign()
4490 bool Success(const APValue &V, const Expr *E) { in Success()
4616 APValue Value; in VisitCastExpr()
4690 bool Success(const APValue &V, const Expr *E) { in Success()
4768 APValue &Result;
4771 RecordExprEvaluator(EvalInfo &info, const LValue &This, APValue &Result) in RecordExprEvaluator()
4774 bool Success(const APValue &V, const Expr *E) { in Success()
4796 const LValue &This, APValue &Result) { in HandleClassZeroInitialization()
4799 Result = APValue(APValue::UninitStruct(), CD ? CD->getNumBases() : 0, in HandleClassZeroInitialization()
4846 Result = APValue((const FieldDecl*)0); in ZeroInitialization()
4853 Result = APValue(*I); in ZeroInitialization()
4876 APValue DerivedObject; in VisitCastExpr()
4883 APValue *Value = &DerivedObject; in VisitCastExpr()
4905 Result = APValue(Field); in VisitInitListExpr()
4930 Result = APValue(APValue::UninitStruct(), 0, in VisitInitListExpr()
4960 APValue &FieldVal = Result.getStructField(Field->getFieldIndex()); in VisitInitListExpr()
4988 Result = APValue((FieldDecl*)0); in VisitCXXConstructExpr()
4990 Result = APValue(APValue::UninitStruct(), RD->getNumBases(), in VisitCXXConstructExpr()
5041 Result = APValue(APValue::UninitStruct(), 0, 2); in VisitCXXStdInitializerListExpr()
5058 Result.getStructField(1) = APValue(APSInt(ArrayType->getSize())); in VisitCXXStdInitializerListExpr()
5069 APValue &Result, EvalInfo &Info) { in EvaluateRecord()
5130 APValue &Result;
5133 VectorExprEvaluator(EvalInfo &info, APValue &Result) in VectorExprEvaluator()
5136 bool Success(const ArrayRef<APValue> &V, const Expr *E) { in Success()
5139 Result = APValue(V.data(), V.size()); in Success()
5142 bool Success(const APValue &V, const Expr *E) { in Success()
5160 static bool EvaluateVector(const Expr* E, APValue& Result, EvalInfo &Info) { in EvaluateVector()
5174 APValue Val = APValue(); in VisitCastExpr()
5179 Val = APValue(IntResult); in VisitCastExpr()
5184 Val = APValue(F); in VisitCastExpr()
5190 SmallVector<APValue, 4> Elts(NElts, Val); in VisitCastExpr()
5202 SmallVector<APValue, 4> Elts; in VisitCastExpr()
5214 Elts.push_back(APValue(APFloat(Sem, Elt))); in VisitCastExpr()
5223 Elts.push_back(APValue(APSInt(Elt, EltTy->isSignedIntegerType()))); in VisitCastExpr()
5242 SmallVector<APValue, 4> Elements; in VisitInitListExpr()
5253 APValue v; in VisitInitListExpr()
5267 Elements.push_back(APValue(sInt)); in VisitInitListExpr()
5276 Elements.push_back(APValue(f)); in VisitInitListExpr()
5288 APValue ZeroElement; in ZeroInitialization()
5290 ZeroElement = APValue(Info.Ctx.MakeIntValue(0, EltTy)); in ZeroInitialization()
5293 APValue(APFloat::getZero(Info.Ctx.getFloatTypeSemantics(EltTy))); in ZeroInitialization()
5295 SmallVector<APValue, 4> Elements(VT->getNumElements(), ZeroElement); in ZeroInitialization()
5312 APValue &Result;
5315 ArrayExprEvaluator(EvalInfo &Info, const LValue &This, APValue &Result) in ArrayExprEvaluator()
5318 bool Success(const APValue &V, const Expr *E) { in Success()
5331 Result = APValue(APValue::UninitArray(), 0, in ZeroInitialization()
5346 APValue *Value, QualType Type);
5351 APValue &Result, EvalInfo &Info) { in EvaluateArray()
5367 APValue Val; in VisitInitListExpr()
5376 APValue Filler; in VisitInitListExpr()
5389 Result = APValue(APValue::UninitArray(), NumEltsToInit, NumElts); in VisitInitListExpr()
5431 APValue *Value, in VisitCXXConstructExpr()
5439 APValue Filler = in VisitCXXConstructExpr()
5441 : APValue(); in VisitCXXConstructExpr()
5443 *Value = APValue(APValue::UninitArray(), N, N); in VisitCXXConstructExpr()
5479 *Value = APValue((FieldDecl*)0); in VisitCXXConstructExpr()
5482 APValue(APValue::UninitStruct(), RD->getNumBases(), in VisitCXXConstructExpr()
5516 APValue &Result;
5518 IntExprEvaluator(EvalInfo &info, APValue &result) in IntExprEvaluator()
5521 bool Success(const llvm::APSInt &SI, const Expr *E, APValue &Result) { in Success()
5528 Result = APValue(SI); in Success()
5535 bool Success(const llvm::APInt &I, const Expr *E, APValue &Result) { in Success()
5540 Result = APValue(APSInt(I)); in Success()
5549 bool Success(uint64_t Value, const Expr *E, APValue &Result) { in Success()
5552 Result = APValue(Info.Ctx.MakeIntValue(Value, E->getType())); in Success()
5563 bool Success(const APValue &V, const Expr *E) { in Success()
5650 static QualType GetObjectType(APValue::LValueBase B);
5664 static bool EvaluateIntegerOrLValue(const Expr *E, APValue &Result, in EvaluateIntegerOrLValue()
5671 APValue Val; in EvaluateInteger()
5800 APValue &V = Result.Val; in EvaluateBuiltinConstantP()
5801 if (V.getKind() == APValue::Int) in EvaluateBuiltinConstantP()
5823 QualType IntExprEvaluator::GetObjectType(APValue::LValueBase B) { in GetObjectType()
6096 APValue Val;
6133 APValue &FinalResult;
6136 DataRecursiveIntBinOpEvaluator(IntExprEvaluator &IntEval, APValue &Result) in DataRecursiveIntBinOpEvaluator()
6163 bool Success(uint64_t Value, const Expr *E, APValue &Result) { in Success()
6166 bool Success(const APSInt &Value, const Expr *E, APValue &Result) { in Success()
6185 const BinaryOperator *E, APValue &Result);
6190 Result.Val = APValue(); in EvaluateExpr()
6249 const BinaryOperator *E, APValue &Result) { in VisitBinOp()
6287 const APValue &LHSVal = LHSResult.Val; in VisitBinOp()
6288 const APValue &RHSVal = RHSResult.Val; in VisitBinOp()
6328 Result = APValue(LHSAddrExpr, RHSAddrExpr); in VisitBinOp()
6510 Result = APValue(LHSAddrExpr, RHSAddrExpr); in VisitBinaryOperator()
7097 bool Success(const APValue &V, const Expr *e) { in Success()
7314 bool Success(const APValue &V, const Expr *e) { in Success()
7692 APValue &Result;
7694 AtomicExprEvaluator(EvalInfo &Info, APValue &Result) in AtomicExprEvaluator()
7697 bool Success(const APValue &V, const Expr *E) { in Success()
7719 static bool EvaluateAtomic(const Expr *E, APValue &Result, EvalInfo &Info) { in EvaluateAtomic()
7735 bool Success(const APValue &V, const Expr *e) { return true; } in Success()
7758 static bool Evaluate(APValue &Result, EvalInfo &Info, const Expr *E) { in Evaluate()
7782 Result = APValue(F); in Evaluate()
7797 APValue &Value = Info.CurrentCall->createTemporary(E, false); in Evaluate()
7804 APValue &Value = Info.CurrentCall->createTemporary(E, false); in Evaluate()
7831 static bool EvaluateInPlace(APValue &Result, EvalInfo &Info, const LValue &This, in EvaluateInPlace()
7851 static bool EvaluateAsRValue(EvalInfo &Info, const Expr *E, APValue &Result) { in EvaluateAsRValue()
7874 Result.Val = APValue(APSInt(L->getValue(), in FastEvaluateAsRValue()
7940 bool Expr::EvaluateAsInitializer(APValue &Value, const ASTContext &Ctx, in EvaluateAsInitializer()
8435 APValue Result; in EvaluateCPlusPlus11IntegralConstantExpr()
8472 bool Expr::isCXX11ConstantExpr(ASTContext &Ctx, APValue *Result, in isCXX11ConstantExpr()
8484 APValue Scratch; in isCXX11ConstantExpr()
8526 APValue Scratch; in isPotentialConstantExpr()