@@ -71,7 +71,7 @@ Address CIRGenFunction::emitAddrOfFieldStorage(Address base,
7171// / derive a more accurate bound on the alignment of the pointer.
7272Address CIRGenFunction::emitPointerWithAlignment (const Expr *expr,
7373 LValueBaseInfo *baseInfo,
74- TBAAAccessInfo *tbaaInfo) {
74+ TBAAAccessInfo *tbaaInfo) {
7575 // We allow this with ObjC object pointers because of fragile ABIs.
7676 assert (expr->getType ()->isPointerType () ||
7777 expr->getType ()->isObjCObjectPointerType ());
@@ -107,9 +107,9 @@ Address CIRGenFunction::emitPointerWithAlignment(const Expr *expr,
107107 cgm.getNaturalTypeAlignment (pointeeType, &targetTypeBaseInfo);
108108
109109 if (tbaaInfo) {
110- TBAAAccessInfo targetTypeTbaaInfo = cgm. getTBAAAccessInfo (pointeeType);
111- *tbaaInfo =
112- cgm.mergeTBAAInfoForCast (*tbaaInfo, targetTypeTbaaInfo);
110+ TBAAAccessInfo targetTypeTbaaInfo =
111+ cgm. getTBAAAccessInfo (pointeeType);
112+ *tbaaInfo = cgm.mergeTBAAInfoForCast (*tbaaInfo, targetTypeTbaaInfo);
113113 }
114114
115115 // If the source l-value is opaque, honor the alignment of the
@@ -323,8 +323,8 @@ static LValue emitGlobalVarDeclLValue(CIRGenFunction &cgf, const Expr *e,
323323
324324void CIRGenFunction::emitStoreOfScalar (mlir::Value value, Address addr,
325325 bool isVolatile, QualType ty,
326- LValueBaseInfo baseInfo, TBAAAccessInfo tbaaInfo,
327- bool isInit,
326+ LValueBaseInfo baseInfo,
327+ TBAAAccessInfo tbaaInfo, bool isInit,
328328 bool isNontemporal) {
329329 assert (!cir::MissingFeatures::opLoadStoreThreadLocal ());
330330
@@ -365,7 +365,8 @@ void CIRGenFunction::emitStoreOfScalar(mlir::Value value, Address addr,
365365 }
366366
367367 assert (currSrcLoc && " must pass in source location" );
368- cir::StoreOp store = builder.createStore (*currSrcLoc, value, addr, isVolatile);
368+ cir::StoreOp store =
369+ builder.createStore (*currSrcLoc, value, addr, isVolatile);
369370 cgm.decorateOperationWithTBAA (store, tbaaInfo);
370371
371372 if (isNontemporal) {
@@ -501,7 +502,8 @@ LValue CIRGenFunction::emitLValueForField(LValue base, const FieldDecl *field) {
501502 // If this is a reference field, load the reference right now.
502503 if (fieldType->isReferenceType ()) {
503504 assert (!cir::MissingFeatures::opTBAA ());
504- LValue refLVal = makeAddrLValue (addr, fieldType, fieldBaseInfo, fieldTbaaInfo);
505+ LValue refLVal =
506+ makeAddrLValue (addr, fieldType, fieldBaseInfo, fieldTbaaInfo);
505507 if (recordCVR & Qualifiers::Volatile)
506508 refLVal.getQuals ().addVolatile ();
507509 addr = emitLoadOfReference (refLVal, getLoc (field->getSourceRange ()),
@@ -573,13 +575,15 @@ void CIRGenFunction::emitStoreOfScalar(mlir::Value value, LValue lvalue,
573575 }
574576
575577 emitStoreOfScalar (value, lvalue.getAddress (), lvalue.isVolatile (),
576- lvalue.getType (), lvalue.getBaseInfo (), lvalue.getTBAAInfo (), isInit,
578+ lvalue.getType (), lvalue.getBaseInfo (),
579+ lvalue.getTBAAInfo (), isInit,
577580 /* isNontemporal=*/ false );
578581}
579582
580583mlir::Value CIRGenFunction::emitLoadOfScalar (Address addr, bool isVolatile,
581584 QualType ty, SourceLocation loc,
582- LValueBaseInfo baseInfo, TBAAAccessInfo tbaaInfo) {
585+ LValueBaseInfo baseInfo,
586+ TBAAAccessInfo tbaaInfo) {
583587 assert (!cir::MissingFeatures::opLoadStoreThreadLocal ());
584588 mlir::Type eltTy = addr.getElementType ();
585589
@@ -613,15 +617,15 @@ mlir::Value CIRGenFunction::emitLoadOfScalar(Address addr, bool isVolatile,
613617 if (!ty->isBooleanType () && ty->hasBooleanRepresentation ())
614618 cgm.errorNYI (" emitLoadOfScalar: boolean type with boolean representation" );
615619
616-
617620 return loadOp;
618621}
619622
620623mlir::Value CIRGenFunction::emitLoadOfScalar (LValue lvalue,
621624 SourceLocation loc) {
622625 assert (!cir::MissingFeatures::opLoadStoreNontemporal ());
623626 return emitLoadOfScalar (lvalue.getAddress (), lvalue.isVolatile (),
624- lvalue.getType (), loc, lvalue.getBaseInfo (), lvalue.getTBAAInfo ());
627+ lvalue.getType (), loc, lvalue.getBaseInfo (),
628+ lvalue.getTBAAInfo ());
625629}
626630
627631// / Given an expression that represents a value lvalue, this
@@ -2298,7 +2302,8 @@ RValue CIRGenFunction::emitReferenceBindingToExpr(const Expr *e) {
22982302}
22992303
23002304Address CIRGenFunction::emitLoadOfReference (LValue refLVal, mlir::Location loc,
2301- LValueBaseInfo *pointeeBaseInfo, TBAAAccessInfo *pointeeTbaaInfo) {
2305+ LValueBaseInfo *pointeeBaseInfo,
2306+ TBAAAccessInfo *pointeeTbaaInfo) {
23022307 if (refLVal.isVolatile ())
23032308 cgm.errorNYI (loc, " load of volatile reference" );
23042309
@@ -2322,7 +2327,8 @@ LValue CIRGenFunction::emitLoadOfReferenceLValue(Address refAddr,
23222327 LValue refLVal = makeAddrLValue (refAddr, refTy, LValueBaseInfo (source));
23232328 LValueBaseInfo pointeeBaseInfo;
23242329 TBAAAccessInfo tbaaAccessInfo;
2325- Address pointeeAddr = emitLoadOfReference (refLVal, loc, &pointeeBaseInfo, &tbaaAccessInfo);
2330+ Address pointeeAddr =
2331+ emitLoadOfReference (refLVal, loc, &pointeeBaseInfo, &tbaaAccessInfo);
23262332 return makeAddrLValue (pointeeAddr, refLVal.getType ()->getPointeeType (),
23272333 pointeeBaseInfo, tbaaAccessInfo);
23282334}
0 commit comments