Lines Matching defs:LV
290 LValue LV = MakeAddrLValue(Location, E->getType());
291 EmitStoreThroughLValue(RV, LV);
299 const Expr *E, LValue LV, AggValueSlot::IsZeroed_t IsZeroed) {
300 QualType Type = LV.getType();
303 EmitComplexExprIntoLValue(E, LV, /*isInit*/ true);
306 EmitAggExpr(E, AggValueSlot::forLValue(LV, AggValueSlot::IsDestructed,
312 if (LV.isSimple())
313 EmitScalarInit(E, /*D=*/nullptr, LV, /*Captured=*/false);
315 EmitStoreThroughLValue(RValue::get(EmitScalarExpr(E)), LV);
643 LValue LV = MakeAddrLValue(Object, E->getType(), AlignmentSource::Decl);
644 LV = EmitLValueForField(LV, Adjustment.Field);
645 assert(LV.isSimple() &&
647 Object = LV.getAddress();
666 LValue LV = EmitLValue(E);
667 assert(LV.isSimple());
668 llvm::Value *Value = LV.getPointer(*this);
1161 LValue LV = EmitLValue(StructBase);
1162 Address Addr = LV.getAddress();
1234 EmitComplexPrePostIncDec(const UnaryOperator *E, LValue LV,
1236 ComplexPairTy InVal = EmitLoadOfComplex(LV, E->getExprLoc());
1259 EmitStoreOfComplex(IncVal, LV, /*init*/ false);
1382 LValue LV = CGF.EmitLValue(UO->getSubExpr(), IsKnownNonNull);
1383 if (BaseInfo) *BaseInfo = LV.getBaseInfo();
1384 if (TBAAInfo) *TBAAInfo = LV.getTBAAInfo();
1385 return LV.getAddress();
1397 LValue LV = CGF.EmitLValue(Call->getArg(0), IsKnownNonNull);
1398 if (BaseInfo) *BaseInfo = LV.getBaseInfo();
1399 if (TBAAInfo) *TBAAInfo = LV.getTBAAInfo();
1400 return LV.getAddress();
1497 LValue LV;
1499 LV = EmitArraySubscriptExpr(cast<ArraySubscriptExpr>(E), /*Accessed*/true);
1501 LV = EmitLValue(E);
1502 if (!isa<DeclRefExpr>(E) && !LV.isBitField() && LV.isSimple()) {
1511 EmitTypeCheck(TCK, E->getExprLoc(), LV, E->getType(), SkippedChecks);
1513 return LV;
1535 LValue LV;
1537 E->getExprLoc(), [&] { LV = EmitLValueHelper(E, IsKnownNonNull); });
1539 if (IsKnownNonNull && !LV.isKnownNonNull())
1540 LV.setKnownNonNull();
1541 return LV;
1623 LValue LV = EmitLValue(cleanups->getSubExpr(), IsKnownNonNull);
1624 if (LV.isSimple()) {
1627 Address Addr = LV.getAddress();
1631 return LValue::MakeAddr(Addr, LV.getType(), getContext(),
1632 LV.getBaseInfo(), LV.getTBAAInfo());
1636 return LV;
2201 static RValue EmitLoadOfMatrixLValue(LValue LV, SourceLocation Loc,
2203 assert(LV.getType()->isConstantMatrixType());
2204 Address Addr = MaybeConvertMatrixAddress(LV.getAddress(), CGF);
2205 LV.setAddress(Addr);
2206 return RValue::get(CGF.EmitLoadOfScalar(LV, Loc));
2209 RValue CodeGenFunction::EmitLoadOfAnyValue(LValue LV, AggValueSlot Slot,
2211 QualType Ty = LV.getType();
2214 return EmitLoadOfLValue(LV, Loc);
2216 return RValue::getComplex(EmitLoadOfComplex(LV, Loc));
2218 EmitAggFinalDestCopy(Ty, Slot, LV, EVK_NonRValue);
2227 RValue CodeGenFunction::EmitLoadOfLValue(LValue LV, SourceLocation Loc) {
2228 if (LV.isObjCWeak()) {
2230 Address AddrWeakObj = LV.getAddress();
2234 if (LV.getQuals().getObjCLifetime() == Qualifiers::OCL_Weak) {
2237 return RValue::get(EmitARCLoadWeak(LV.getAddress()));
2241 llvm::Value *Object = EmitARCLoadWeakRetained(LV.getAddress());
2242 Object = EmitObjCConsumeObject(LV.getType(), Object);
2246 if (LV.isSimple()) {
2247 assert(!LV.getType()->isFunctionType());
2249 if (LV.getType()->isConstantMatrixType())
2250 return EmitLoadOfMatrixLValue(LV, Loc, *this);
2253 return RValue::get(EmitLoadOfScalar(LV, Loc));
2256 if (LV.isVectorElt()) {
2257 llvm::LoadInst *Load = Builder.CreateLoad(LV.getVectorAddress(),
2258 LV.isVolatileQualified());
2259 return RValue::get(Builder.CreateExtractElement(Load, LV.getVectorIdx(),
2265 if (LV.isExtVectorElt()) {
2266 return EmitLoadOfExtVectorElementLValue(LV);
2270 if (LV.isGlobalReg())
2271 return EmitLoadOfGlobalRegLValue(LV);
2273 if (LV.isMatrixElt()) {
2274 llvm::Value *Idx = LV.getMatrixIdx();
2276 const auto *const MatTy = LV.getType()->castAs<ConstantMatrixType>();
2281 Builder.CreateLoad(LV.getMatrixAddress(), LV.isVolatileQualified());
2285 assert(LV.isBitField() && "Unknown LValue type!");
2286 return EmitLoadOfBitfieldLValue(LV, Loc);
2289 RValue CodeGenFunction::EmitLoadOfBitfieldLValue(LValue LV,
2291 const CGBitFieldInfo &Info = LV.getBitFieldInfo();
2294 llvm::Type *ResLTy = ConvertType(LV.getType());
2296 Address Ptr = LV.getBitFieldAddress();
2298 Builder.CreateLoad(Ptr, LV.isVolatileQualified(), "bf.load");
2300 bool UseVolatile = LV.isVolatileQualified() &&
2320 EmitScalarRangeCheck(Val, LV.getType(), Loc);
2326 RValue CodeGenFunction::EmitLoadOfExtVectorElementLValue(LValue LV) {
2327 llvm::Value *Vec = Builder.CreateLoad(LV.getExtVectorAddress(),
2328 LV.isVolatileQualified());
2338 const llvm::Constant *Elts = LV.getExtVectorElts();
2342 const VectorType *ExprVT = LV.getType()->getAs<VectorType>();
2361 Address CodeGenFunction::EmitExtVectorElementLValue(LValue LV) {
2362 Address VectorAddress = LV.getExtVectorAddress();
2363 QualType EQT = LV.getType()->castAs<VectorType>()->getElementType();
2368 const llvm::Constant *Elts = LV.getExtVectorElts();
2379 RValue CodeGenFunction::EmitLoadOfGlobalRegLValue(LValue LV) {
2380 assert((LV.getType()->isIntegerType() || LV.getType()->isPointerType()) &&
2383 cast<llvm::MetadataAsValue>(LV.getGlobalReg())->getMetadata());
2386 llvm::Type *OrigTy = CGM.getTypes().ConvertType(LV.getType());
2711 LValue &LV,
2724 LV.setObjCIvar(false);
2728 LV.setObjCIvar(true);
2730 LV.setBaseIvarExp(Exp->getBase());
2731 LV.setObjCArray(E->getType()->isArrayType());
2738 LV.setGlobalObjCRef(true);
2739 LV.setThreadLocalRef(VD->getTLSKind() != VarDecl::TLS_None);
2742 LV.setObjCArray(E->getType()->isArrayType());
2747 setObjCGCLValueClass(Ctx, Exp->getSubExpr(), LV, IsMemberAccess);
2752 setObjCGCLValueClass(Ctx, Exp->getSubExpr(), LV, IsMemberAccess);
2753 if (LV.isObjCIvar()) {
2760 LV.setObjCIvar(false);
2766 setObjCGCLValueClass(Ctx, Exp->getResultExpr(), LV);
2771 setObjCGCLValueClass(Ctx, Exp->getSubExpr(), LV, IsMemberAccess);
2776 setObjCGCLValueClass(Ctx, Exp->getSubExpr(), LV, IsMemberAccess);
2781 setObjCGCLValueClass(Ctx, Exp->getSubExpr(), LV, IsMemberAccess);
2786 setObjCGCLValueClass(Ctx, Exp->getBase(), LV);
2787 if (LV.isObjCIvar() && !LV.isObjCArray())
2790 LV.setObjCIvar(false);
2791 else if (LV.isGlobalObjCRef() && !LV.isObjCArray())
2794 LV.setGlobalObjCRef(false);
2799 setObjCGCLValueClass(Ctx, Exp->getBase(), LV, true);
2801 // only in the context of LV.isObjCIvar().
2802 LV.setObjCArray(E->getType()->isArrayType());
2912 LValue LV = VD->getType()->isReferenceType() ?
2916 setObjCGCLValueClass(CGF.getContext(), E, LV);
2917 return LV;
3177 LValue LV = VD->getType()->isReferenceType() ?
3187 LV.getQuals().removeObjCGCAttr();
3188 LV.setNonGC(true);
3194 LV.setARCPreciseLifetime(ARCImpreciseLifetime);
3195 setObjCGCLValueClass(getContext(), E, LV);
3196 return LV;
3253 LValue LV = MakeAddrLValue(Addr, T, BaseInfo, TBAAInfo);
3254 LV.getQuals().setAddressSpace(ExprTy.getAddressSpace());
3262 LV.isObjCWeak())
3263 LV.setNonGC(!E->isOBJCGCCandidate(getContext()));
3264 return LV;
3268 LValue LV = EmitLValue(E->getSubExpr());
3269 assert(LV.isSimple() && "real/imag on non-ordinary l-value");
3274 !LV.getAddress().getElementType()->isStructTy()) {
3276 return LV;
3283 ? emitAddrOfRealComponent(LV.getAddress(), LV.getType())
3284 : emitAddrOfImagComponent(LV.getAddress(), LV.getType()));
3285 LValue ElemLV = MakeAddrLValue(Component, T, LV.getBaseInfo(),
3286 CGM.getTBAAInfoForSubobject(LV, T));
3287 ElemLV.getQuals().addQualifiers(LV.getQuals());
3292 LValue LV = EmitLValue(E->getSubExpr());
3296 EmitComplexPrePostIncDec(E, LV, isInc, true/*isPre*/);
3298 EmitScalarPrePostIncDec(E, LV, isInc, true/*isPre*/);
3299 return LV;
3979 LValue LV = EmitLValue(E);
3980 Address Addr = LV.getAddress();
4001 if (BaseInfo) *BaseInfo = LV.getBaseInfo();
4292 LValue LV = EmitLValue(E->getBase());
4294 Address Addr = EmitExtVectorElementLValue(LV);
4296 QualType EltType = LV.getType()->castAs<VectorType>()->getElementType();
4299 return MakeAddrLValue(Addr, EltType, LV.getBaseInfo(),
4300 CGM.getTBAAInfoForSubobject(LV, EltType));
4432 LValue LV = MakeAddrLValue(Addr, E->getType(), EltBaseInfo, EltTBAAInfo);
4436 LV.setNonGC(!E->isOBJCGCCandidate(getContext()));
4437 setObjCGCLValueClass(getContext(), E, LV);
4439 return LV;
4758 LValue LV = EmitLValueForField(BaseLV, Field);
4759 setObjCGCLValueClass(getContext(), E, LV);
4767 LV.setNontemporal(/*Value=*/true);
4769 return LV;
5061 LValue LV = MakeAddrLValue(addr, FieldType, FieldBaseInfo, FieldTBAAInfo);
5062 LV.getQuals().addCVRQualifiers(RecordCVR);
5065 if (LV.getQuals().getObjCGCAttr() == Qualifiers::Weak)
5066 LV.getQuals().removeObjCGCAttr();
5068 return LV;
5351 LValue LV = EmitLValue(E->getSubExpr());
5352 Address V = LV.getAddress();
5368 LValue LV = EmitLValue(E->getSubExpr());
5371 LV.getQuals() = E->getType().getQualifiers();
5372 if (LV.isSimple()) {
5373 Address V = LV.getAddress();
5377 LV.setAddress(V.withElementType(T));
5380 return LV;
5389 LValue LV = EmitLValue(E->getSubExpr());
5390 Address This = LV.getAddress();
5400 return MakeAddrLValue(Base, E->getType(), LV.getBaseInfo(),
5401 CGM.getTBAAInfoForSubobject(LV, E->getType()));
5409 LValue LV = EmitLValue(E->getSubExpr());
5413 LV.getAddress(), DerivedClassDecl, E->path_begin(), E->path_end(),
5427 return MakeAddrLValue(Derived, E->getType(), LV.getBaseInfo(),
5428 CGM.getTBAAInfoForSubobject(LV, E->getType()));
5435 LValue LV = EmitLValue(E->getSubExpr());
5436 Address V = LV.getAddress().withElementType(
5444 return MakeAddrLValue(V, E->getType(), LV.getBaseInfo(),
5445 CGM.getTBAAInfoForSubobject(LV, E->getType()));
5448 LValue LV = EmitLValue(E->getSubExpr());
5451 *this, LV.getPointer(*this),
5455 LV.getAddress().getAlignment()),
5456 E->getType(), LV.getBaseInfo(), LV.getTBAAInfo());
5459 LValue LV = EmitLValue(E->getSubExpr());
5460 Address V = LV.getAddress().withElementType(ConvertType(E->getType()));
5461 return MakeAddrLValue(V, E->getType(), LV.getBaseInfo(),
5462 CGM.getTBAAInfoForSubobject(LV, E->getType()));
5548 RValue CodeGenFunction::EmitRValueForField(LValue LV,
5552 LValue FieldLV = EmitLValueForField(LV, FD);
5797 LValue LV = EmitCheckedLValue(E->getLHS(), TCK_Store);
5800 EmitNullabilityCheck(LV, RV.getScalarVal(), E->getExprLoc());
5802 if (LV.isBitField()) {
5807 EmitStoreThroughBitfieldLValue(RV, LV, &Result);
5809 EmitStoreThroughBitfieldLValue(RV, LV);
5816 LV.getBitFieldInfo(), E->getExprLoc());
5818 EmitStoreThroughLValue(RV, LV);
5823 return LV;
5964 LValue LV =
5967 setObjCGCLValueClass(getContext(), E, LV);
5968 return LV;
6290 LValue LV;
6326 LValue LV = CGF.MakeAddrLValue(slot.getAddress(), ov->getType(),
6328 opaqueData = OVMA::bind(CGF, ov, LV);
6338 result.LV = CGF.EmitLValue(ov);
6350 result.LV = CGF.EmitLValue(semantic);
6373 return emitPseudoObjectExpr(*this, E, true, AggValueSlot::ignored()).LV;