Skip to content

Commit fb439ca

Browse files
committed
Merge with the master
1 parent bd7f0cc commit fb439ca

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

clang/lib/CIR/CodeGen/CIRGenExpr.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -471,37 +471,37 @@ static Address emitArraySubscriptPtr(CIRGenFunction &cgf,
471471
const CharUnits eltAlign =
472472
getArrayElementAlign(addr.getAlignment(), idx, eltSize);
473473

474-
assert(!cir::MissingFeatures::preservedAccessIndexRegion());
475-
const mlir::Value eltPtr =
476-
emitArraySubscriptPtr(cgf, beginLoc, endLoc, addr.getPointer(),
477-
addr.getElementType(), idx, shouldDecay);
478-
const mlir::Type elementType = cgf.convertTypeForMem(eltType);
479-
return Address(eltPtr, elementType, eltAlign);
474+
assert(!cir::MissingFeatures::preservedAccessIndexRegion());
475+
const mlir::Value eltPtr =
476+
emitArraySubscriptPtr(cgf, beginLoc, endLoc, addr.getPointer(),
477+
addr.getElementType(), idx, shouldDecay);
478+
const mlir::Type elementType = cgf.convertTypeForMem(eltType);
479+
return Address(eltPtr, elementType, eltAlign);
480480
}
481481

482482
LValue
483483
CIRGenFunction::emitArraySubscriptExpr(const clang::ArraySubscriptExpr *e) {
484484
if (e->getBase()->getType()->isVectorType() &&
485485
!isa<ExtVectorElementExpr>(e->getBase())) {
486486
cgm.errorNYI(e->getSourceRange(), "emitArraySubscriptExpr: VectorType");
487-
return LValue::makeAddr(Address::invalid(), e->getType());
487+
return LValue::makeAddr(Address::invalid(), e->getType(), LValueBaseInfo());
488488
}
489489

490490
if (isa<ExtVectorElementExpr>(e->getBase())) {
491491
cgm.errorNYI(e->getSourceRange(),
492492
"emitArraySubscriptExpr: ExtVectorElementExpr");
493-
return LValue::makeAddr(Address::invalid(), e->getType());
493+
return LValue::makeAddr(Address::invalid(), e->getType(), LValueBaseInfo());
494494
}
495495

496496
if (getContext().getAsVariableArrayType(e->getType())) {
497497
cgm.errorNYI(e->getSourceRange(),
498498
"emitArraySubscriptExpr: VariableArrayType");
499-
return LValue::makeAddr(Address::invalid(), e->getType());
499+
return LValue::makeAddr(Address::invalid(), e->getType(), LValueBaseInfo());
500500
}
501501

502502
if (e->getType()->getAs<ObjCObjectType>()) {
503503
cgm.errorNYI(e->getSourceRange(), "emitArraySubscriptExpr: ObjCObjectType");
504-
return LValue::makeAddr(Address::invalid(), e->getType());
504+
return LValue::makeAddr(Address::invalid(), e->getType(), LValueBaseInfo());
505505
}
506506

507507
// The index must always be an integer, which is not an aggregate. Emit it
@@ -522,7 +522,7 @@ CIRGenFunction::emitArraySubscriptExpr(const clang::ArraySubscriptExpr *e) {
522522
arrayLV.getAddress(), e->getType(), idx, cgm.getLoc(e->getExprLoc()),
523523
/*shouldDecay=*/true);
524524

525-
return LValue::makeAddr(addr, e->getType());
525+
return LValue::makeAddr(addr, e->getType(), LValueBaseInfo());
526526
}
527527

528528
// The base must be a pointer; emit it with an estimate of its alignment.

clang/lib/CIR/CodeGen/CIRGenValue.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323

2424
#include "mlir/IR/Value.h"
2525

26+
#include "clang/CIR/MissingFeatures.h"
27+
2628
namespace clang::CIRGen {
2729

2830
/// This trivial value class is used to represent the result of an

0 commit comments

Comments
 (0)