Lines Matching full:lv

276     LValue LV = MakeAddrLValue(Location, E->getType());  in EmitAnyExprToMem()  local
277 EmitStoreThroughLValue(RV, LV); in EmitAnyExprToMem()
605 LValue LV = MakeAddrLValue(Object, E->getType(), AlignmentSource::Decl); in EmitMaterializeTemporaryExpr() local
606 LV = EmitLValueForField(LV, Adjustment.Field); in EmitMaterializeTemporaryExpr()
607 assert(LV.isSimple() && in EmitMaterializeTemporaryExpr()
609 Object = LV.getAddress(); in EmitMaterializeTemporaryExpr()
628 LValue LV = EmitLValue(E); in EmitReferenceBindingToExpr() local
629 assert(LV.isSimple()); in EmitReferenceBindingToExpr()
630 llvm::Value *Value = LV.getPointer(*this); in EmitReferenceBindingToExpr()
1130 LValue LV = EmitLValue(StructBase); in EmitCountedByFieldExpr() local
1131 Address Addr = LV.getAddress(); in EmitCountedByFieldExpr()
1206 EmitComplexPrePostIncDec(const UnaryOperator *E, LValue LV, in EmitComplexPrePostIncDec() argument
1208 ComplexPairTy InVal = EmitLoadOfComplex(LV, E->getExprLoc()); in EmitComplexPrePostIncDec()
1231 EmitStoreOfComplex(IncVal, LV, /*init*/ false); in EmitComplexPrePostIncDec()
1354 LValue LV = CGF.EmitLValue(UO->getSubExpr(), IsKnownNonNull); in EmitPointerWithAlignment() local
1355 if (BaseInfo) *BaseInfo = LV.getBaseInfo(); in EmitPointerWithAlignment()
1356 if (TBAAInfo) *TBAAInfo = LV.getTBAAInfo(); in EmitPointerWithAlignment()
1357 return LV.getAddress(); in EmitPointerWithAlignment()
1369 LValue LV = CGF.EmitLValue(Call->getArg(0), IsKnownNonNull); in EmitPointerWithAlignment() local
1370 if (BaseInfo) *BaseInfo = LV.getBaseInfo(); in EmitPointerWithAlignment()
1371 if (TBAAInfo) *TBAAInfo = LV.getTBAAInfo(); in EmitPointerWithAlignment()
1372 return LV.getAddress(); in EmitPointerWithAlignment()
1469 LValue LV; in EmitCheckedLValue() local
1471 LV = EmitArraySubscriptExpr(cast<ArraySubscriptExpr>(E), /*Accessed*/true); in EmitCheckedLValue()
1473 LV = EmitLValue(E); in EmitCheckedLValue()
1474 if (!isa<DeclRefExpr>(E) && !LV.isBitField() && LV.isSimple()) { in EmitCheckedLValue()
1483 EmitTypeCheck(TCK, E->getExprLoc(), LV, E->getType(), SkippedChecks); in EmitCheckedLValue()
1485 return LV; in EmitCheckedLValue()
1505 LValue LV = EmitLValueHelper(E, IsKnownNonNull); in EmitLValue() local
1506 if (IsKnownNonNull && !LV.isKnownNonNull()) in EmitLValue()
1507 LV.setKnownNonNull(); in EmitLValue()
1508 return LV; in EmitLValue()
1590 LValue LV = EmitLValue(cleanups->getSubExpr(), IsKnownNonNull); in EmitLValueHelper() local
1591 if (LV.isSimple()) { in EmitLValueHelper()
1594 Address Addr = LV.getAddress(); in EmitLValueHelper()
1598 return LValue::MakeAddr(Addr, LV.getType(), getContext(), in EmitLValueHelper()
1599 LV.getBaseInfo(), LV.getTBAAInfo()); in EmitLValueHelper()
1603 return LV; in EmitLValueHelper()
2164 static RValue EmitLoadOfMatrixLValue(LValue LV, SourceLocation Loc, in EmitLoadOfMatrixLValue() argument
2166 assert(LV.getType()->isConstantMatrixType()); in EmitLoadOfMatrixLValue()
2167 Address Addr = MaybeConvertMatrixAddress(LV.getAddress(), CGF); in EmitLoadOfMatrixLValue()
2168 LV.setAddress(Addr); in EmitLoadOfMatrixLValue()
2169 return RValue::get(CGF.EmitLoadOfScalar(LV, Loc)); in EmitLoadOfMatrixLValue()
2172 RValue CodeGenFunction::EmitLoadOfAnyValue(LValue LV, AggValueSlot Slot, in EmitLoadOfAnyValue() argument
2174 QualType Ty = LV.getType(); in EmitLoadOfAnyValue()
2177 return EmitLoadOfLValue(LV, Loc); in EmitLoadOfAnyValue()
2179 return RValue::getComplex(EmitLoadOfComplex(LV, Loc)); in EmitLoadOfAnyValue()
2181 EmitAggFinalDestCopy(Ty, Slot, LV, EVK_NonRValue); in EmitLoadOfAnyValue()
2190 RValue CodeGenFunction::EmitLoadOfLValue(LValue LV, SourceLocation Loc) { in EmitLoadOfLValue() argument
2191 if (LV.isObjCWeak()) { in EmitLoadOfLValue()
2193 Address AddrWeakObj = LV.getAddress(); in EmitLoadOfLValue()
2197 if (LV.getQuals().getObjCLifetime() == Qualifiers::OCL_Weak) { in EmitLoadOfLValue()
2200 return RValue::get(EmitARCLoadWeak(LV.getAddress())); in EmitLoadOfLValue()
2204 llvm::Value *Object = EmitARCLoadWeakRetained(LV.getAddress()); in EmitLoadOfLValue()
2205 Object = EmitObjCConsumeObject(LV.getType(), Object); in EmitLoadOfLValue()
2209 if (LV.isSimple()) { in EmitLoadOfLValue()
2210 assert(!LV.getType()->isFunctionType()); in EmitLoadOfLValue()
2212 if (LV.getType()->isConstantMatrixType()) in EmitLoadOfLValue()
2213 return EmitLoadOfMatrixLValue(LV, Loc, *this); in EmitLoadOfLValue()
2216 return RValue::get(EmitLoadOfScalar(LV, Loc)); in EmitLoadOfLValue()
2219 if (LV.isVectorElt()) { in EmitLoadOfLValue()
2220 llvm::LoadInst *Load = Builder.CreateLoad(LV.getVectorAddress(), in EmitLoadOfLValue()
2221 LV.isVolatileQualified()); in EmitLoadOfLValue()
2222 return RValue::get(Builder.CreateExtractElement(Load, LV.getVectorIdx(), in EmitLoadOfLValue()
2228 if (LV.isExtVectorElt()) { in EmitLoadOfLValue()
2229 return EmitLoadOfExtVectorElementLValue(LV); in EmitLoadOfLValue()
2233 if (LV.isGlobalReg()) in EmitLoadOfLValue()
2234 return EmitLoadOfGlobalRegLValue(LV); in EmitLoadOfLValue()
2236 if (LV.isMatrixElt()) { in EmitLoadOfLValue()
2237 llvm::Value *Idx = LV.getMatrixIdx(); in EmitLoadOfLValue()
2239 const auto *const MatTy = LV.getType()->castAs<ConstantMatrixType>(); in EmitLoadOfLValue()
2244 Builder.CreateLoad(LV.getMatrixAddress(), LV.isVolatileQualified()); in EmitLoadOfLValue()
2248 assert(LV.isBitField() && "Unknown LValue type!"); in EmitLoadOfLValue()
2249 return EmitLoadOfBitfieldLValue(LV, Loc); in EmitLoadOfLValue()
2252 RValue CodeGenFunction::EmitLoadOfBitfieldLValue(LValue LV, in EmitLoadOfBitfieldLValue() argument
2254 const CGBitFieldInfo &Info = LV.getBitFieldInfo(); in EmitLoadOfBitfieldLValue()
2257 llvm::Type *ResLTy = ConvertType(LV.getType()); in EmitLoadOfBitfieldLValue()
2259 Address Ptr = LV.getBitFieldAddress(); in EmitLoadOfBitfieldLValue()
2261 Builder.CreateLoad(Ptr, LV.isVolatileQualified(), "bf.load"); in EmitLoadOfBitfieldLValue()
2263 bool UseVolatile = LV.isVolatileQualified() && in EmitLoadOfBitfieldLValue()
2283 EmitScalarRangeCheck(Val, LV.getType(), Loc); in EmitLoadOfBitfieldLValue()
2289 RValue CodeGenFunction::EmitLoadOfExtVectorElementLValue(LValue LV) { in EmitLoadOfExtVectorElementLValue() argument
2290 llvm::Value *Vec = Builder.CreateLoad(LV.getExtVectorAddress(), in EmitLoadOfExtVectorElementLValue()
2291 LV.isVolatileQualified()); in EmitLoadOfExtVectorElementLValue()
2301 const llvm::Constant *Elts = LV.getExtVectorElts(); in EmitLoadOfExtVectorElementLValue()
2305 const VectorType *ExprVT = LV.getType()->getAs<VectorType>(); in EmitLoadOfExtVectorElementLValue()
2324 Address CodeGenFunction::EmitExtVectorElementLValue(LValue LV) { in EmitExtVectorElementLValue() argument
2325 Address VectorAddress = LV.getExtVectorAddress(); in EmitExtVectorElementLValue()
2326 QualType EQT = LV.getType()->castAs<VectorType>()->getElementType(); in EmitExtVectorElementLValue()
2331 const llvm::Constant *Elts = LV.getExtVectorElts(); in EmitExtVectorElementLValue()
2342 RValue CodeGenFunction::EmitLoadOfGlobalRegLValue(LValue LV) { in EmitLoadOfGlobalRegLValue() argument
2343 assert((LV.getType()->isIntegerType() || LV.getType()->isPointerType()) && in EmitLoadOfGlobalRegLValue()
2346 cast<llvm::MetadataAsValue>(LV.getGlobalReg())->getMetadata()); in EmitLoadOfGlobalRegLValue()
2349 llvm::Type *OrigTy = CGM.getTypes().ConvertType(LV.getType()); in EmitLoadOfGlobalRegLValue()
2667 LValue &LV, in setObjCGCLValueClass() argument
2680 LV.setObjCIvar(false); in setObjCGCLValueClass()
2684 LV.setObjCIvar(true); in setObjCGCLValueClass()
2686 LV.setBaseIvarExp(Exp->getBase()); in setObjCGCLValueClass()
2687 LV.setObjCArray(E->getType()->isArrayType()); in setObjCGCLValueClass()
2694 LV.setGlobalObjCRef(true); in setObjCGCLValueClass()
2695 LV.setThreadLocalRef(VD->getTLSKind() != VarDecl::TLS_None); in setObjCGCLValueClass()
2698 LV.setObjCArray(E->getType()->isArrayType()); in setObjCGCLValueClass()
2703 setObjCGCLValueClass(Ctx, Exp->getSubExpr(), LV, IsMemberAccess); in setObjCGCLValueClass()
2708 setObjCGCLValueClass(Ctx, Exp->getSubExpr(), LV, IsMemberAccess); in setObjCGCLValueClass()
2709 if (LV.isObjCIvar()) { in setObjCGCLValueClass()
2716 LV.setObjCIvar(false); in setObjCGCLValueClass()
2722 setObjCGCLValueClass(Ctx, Exp->getResultExpr(), LV); in setObjCGCLValueClass()
2727 setObjCGCLValueClass(Ctx, Exp->getSubExpr(), LV, IsMemberAccess); in setObjCGCLValueClass()
2732 setObjCGCLValueClass(Ctx, Exp->getSubExpr(), LV, IsMemberAccess); in setObjCGCLValueClass()
2737 setObjCGCLValueClass(Ctx, Exp->getSubExpr(), LV, IsMemberAccess); in setObjCGCLValueClass()
2742 setObjCGCLValueClass(Ctx, Exp->getBase(), LV); in setObjCGCLValueClass()
2743 if (LV.isObjCIvar() && !LV.isObjCArray()) in setObjCGCLValueClass()
2746 LV.setObjCIvar(false); in setObjCGCLValueClass()
2747 else if (LV.isGlobalObjCRef() && !LV.isObjCArray()) in setObjCGCLValueClass()
2750 LV.setGlobalObjCRef(false); in setObjCGCLValueClass()
2755 setObjCGCLValueClass(Ctx, Exp->getBase(), LV, true); in setObjCGCLValueClass()
2757 // only in the context of LV.isObjCIvar(). in setObjCGCLValueClass()
2758 LV.setObjCArray(E->getType()->isArrayType()); in setObjCGCLValueClass()
2868 LValue LV = VD->getType()->isReferenceType() ? in EmitGlobalVarDeclLValue() local
2872 setObjCGCLValueClass(CGF.getContext(), E, LV); in EmitGlobalVarDeclLValue()
2873 return LV; in EmitGlobalVarDeclLValue()
3133 LValue LV = VD->getType()->isReferenceType() ? in EmitDeclRefLValue() local
3143 LV.getQuals().removeObjCGCAttr(); in EmitDeclRefLValue()
3144 LV.setNonGC(true); in EmitDeclRefLValue()
3150 LV.setARCPreciseLifetime(ARCImpreciseLifetime); in EmitDeclRefLValue()
3151 setObjCGCLValueClass(getContext(), E, LV); in EmitDeclRefLValue()
3152 return LV; in EmitDeclRefLValue()
3209 LValue LV = MakeAddrLValue(Addr, T, BaseInfo, TBAAInfo); in EmitUnaryOpLValue() local
3210 LV.getQuals().setAddressSpace(ExprTy.getAddressSpace()); in EmitUnaryOpLValue()
3218 LV.isObjCWeak()) in EmitUnaryOpLValue()
3219 LV.setNonGC(!E->isOBJCGCCandidate(getContext())); in EmitUnaryOpLValue()
3220 return LV; in EmitUnaryOpLValue()
3224 LValue LV = EmitLValue(E->getSubExpr()); in EmitUnaryOpLValue() local
3225 assert(LV.isSimple() && "real/imag on non-ordinary l-value"); in EmitUnaryOpLValue()
3230 !LV.getAddress().getElementType()->isStructTy()) { in EmitUnaryOpLValue()
3232 return LV; in EmitUnaryOpLValue()
3239 ? emitAddrOfRealComponent(LV.getAddress(), LV.getType()) in EmitUnaryOpLValue()
3240 : emitAddrOfImagComponent(LV.getAddress(), LV.getType())); in EmitUnaryOpLValue()
3241 LValue ElemLV = MakeAddrLValue(Component, T, LV.getBaseInfo(), in EmitUnaryOpLValue()
3242 CGM.getTBAAInfoForSubobject(LV, T)); in EmitUnaryOpLValue()
3243 ElemLV.getQuals().addQualifiers(LV.getQuals()); in EmitUnaryOpLValue()
3248 LValue LV = EmitLValue(E->getSubExpr()); in EmitUnaryOpLValue() local
3252 EmitComplexPrePostIncDec(E, LV, isInc, true/*isPre*/); in EmitUnaryOpLValue()
3254 EmitScalarPrePostIncDec(E, LV, isInc, true/*isPre*/); in EmitUnaryOpLValue()
3255 return LV; in EmitUnaryOpLValue()
3894 LValue LV = EmitLValue(E); in EmitArrayToPointerDecay() local
3895 Address Addr = LV.getAddress(); in EmitArrayToPointerDecay()
3916 if (BaseInfo) *BaseInfo = LV.getBaseInfo(); in EmitArrayToPointerDecay()
4207 LValue LV = EmitLValue(E->getBase()); in EmitArraySubscriptExpr() local
4209 Address Addr = EmitExtVectorElementLValue(LV); in EmitArraySubscriptExpr()
4211 QualType EltType = LV.getType()->castAs<VectorType>()->getElementType(); in EmitArraySubscriptExpr()
4214 return MakeAddrLValue(Addr, EltType, LV.getBaseInfo(), in EmitArraySubscriptExpr()
4215 CGM.getTBAAInfoForSubobject(LV, EltType)); in EmitArraySubscriptExpr()
4348 LValue LV = MakeAddrLValue(Addr, E->getType(), EltBaseInfo, EltTBAAInfo); in EmitArraySubscriptExpr() local
4352 LV.setNonGC(!E->isOBJCGCCandidate(getContext())); in EmitArraySubscriptExpr()
4353 setObjCGCLValueClass(getContext(), E, LV); in EmitArraySubscriptExpr()
4355 return LV; in EmitArraySubscriptExpr()
4663 LValue LV = EmitLValueForField(BaseLV, Field); in EmitMemberExpr() local
4664 setObjCGCLValueClass(getContext(), E, LV); in EmitMemberExpr()
4672 LV.setNontemporal(/*Value=*/true); in EmitMemberExpr()
4674 return LV; in EmitMemberExpr()
4966 LValue LV = MakeAddrLValue(addr, FieldType, FieldBaseInfo, FieldTBAAInfo); in EmitLValueForField() local
4967 LV.getQuals().addCVRQualifiers(RecordCVR); in EmitLValueForField()
4970 if (LV.getQuals().getObjCGCAttr() == Qualifiers::Weak) in EmitLValueForField()
4971 LV.getQuals().removeObjCGCAttr(); in EmitLValueForField()
4973 return LV; in EmitLValueForField()
5255 LValue LV = EmitLValue(E->getSubExpr()); in EmitCastLValue() local
5256 Address V = LV.getAddress(); in EmitCastLValue()
5272 LValue LV = EmitLValue(E->getSubExpr()); in EmitCastLValue() local
5275 LV.getQuals() = E->getType().getQualifiers(); in EmitCastLValue()
5276 if (LV.isSimple()) { in EmitCastLValue()
5277 Address V = LV.getAddress(); in EmitCastLValue()
5281 LV.setAddress(V.withElementType(T)); in EmitCastLValue()
5284 return LV; in EmitCastLValue()
5293 LValue LV = EmitLValue(E->getSubExpr()); in EmitCastLValue() local
5294 Address This = LV.getAddress(); in EmitCastLValue()
5304 return MakeAddrLValue(Base, E->getType(), LV.getBaseInfo(), in EmitCastLValue()
5305 CGM.getTBAAInfoForSubobject(LV, E->getType())); in EmitCastLValue()
5313 LValue LV = EmitLValue(E->getSubExpr()); in EmitCastLValue() local
5317 LV.getAddress(), DerivedClassDecl, E->path_begin(), E->path_end(), in EmitCastLValue()
5331 return MakeAddrLValue(Derived, E->getType(), LV.getBaseInfo(), in EmitCastLValue()
5332 CGM.getTBAAInfoForSubobject(LV, E->getType())); in EmitCastLValue()
5339 LValue LV = EmitLValue(E->getSubExpr()); in EmitCastLValue() local
5340 Address V = LV.getAddress().withElementType( in EmitCastLValue()
5348 return MakeAddrLValue(V, E->getType(), LV.getBaseInfo(), in EmitCastLValue()
5349 CGM.getTBAAInfoForSubobject(LV, E->getType())); in EmitCastLValue()
5352 LValue LV = EmitLValue(E->getSubExpr()); in EmitCastLValue() local
5355 *this, LV.getPointer(*this), in EmitCastLValue()
5359 LV.getAddress().getAlignment()), in EmitCastLValue()
5360 E->getType(), LV.getBaseInfo(), LV.getTBAAInfo()); in EmitCastLValue()
5363 LValue LV = EmitLValue(E->getSubExpr()); in EmitCastLValue() local
5364 Address V = LV.getAddress().withElementType(ConvertType(E->getType())); in EmitCastLValue()
5365 return MakeAddrLValue(V, E->getType(), LV.getBaseInfo(), in EmitCastLValue()
5366 CGM.getTBAAInfoForSubobject(LV, E->getType())); in EmitCastLValue()
5415 RValue CodeGenFunction::EmitRValueForField(LValue LV, in EmitRValueForField() argument
5419 LValue FieldLV = EmitLValueForField(LV, FD); in EmitRValueForField()
5647 LValue LV = EmitCheckedLValue(E->getLHS(), TCK_Store); in EmitBinaryOperatorLValue() local
5650 EmitNullabilityCheck(LV, RV.getScalarVal(), E->getExprLoc()); in EmitBinaryOperatorLValue()
5652 if (LV.isBitField()) { in EmitBinaryOperatorLValue()
5657 EmitStoreThroughBitfieldLValue(RV, LV, &Result); in EmitBinaryOperatorLValue()
5659 EmitStoreThroughBitfieldLValue(RV, LV); in EmitBinaryOperatorLValue()
5666 LV.getBitFieldInfo(), E->getExprLoc()); in EmitBinaryOperatorLValue()
5668 EmitStoreThroughLValue(RV, LV); in EmitBinaryOperatorLValue()
5673 return LV; in EmitBinaryOperatorLValue()
5795 LValue LV = in EmitObjCIvarRefLValue() local
5798 setObjCGCLValueClass(getContext(), E, LV); in EmitObjCIvarRefLValue()
5799 return LV; in EmitObjCIvarRefLValue()
6143 LValue LV; member
6179 LValue LV = CGF.MakeAddrLValue(slot.getAddress(), ov->getType(), in emitPseudoObjectExpr() local
6181 opaqueData = OVMA::bind(CGF, ov, LV); in emitPseudoObjectExpr()
6191 result.LV = CGF.EmitLValue(ov); in emitPseudoObjectExpr()
6203 result.LV = CGF.EmitLValue(semantic); in emitPseudoObjectExpr()
6226 return emitPseudoObjectExpr(*this, E, true, AggValueSlot::ignored()).LV; in EmitPseudoObjectLValue()