Skip to content

Commit 3961eb9

Browse files
committed
Fix SubIndex type
1 parent 0bcc2ed commit 3961eb9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

polygeist/tools/cgeist/Lib/CGExpr.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2645,7 +2645,7 @@ ValueCategory MLIRScanner::EmitPointerArithmetic(const BinOpInfo &Info) {
26452645
return Result.BitCast(Builder, Loc, Pointer.val.getType());
26462646
}
26472647

2648-
auto ElemTy = Glob.getTypes().getMLIRType(ElementType);
2648+
auto ElemTy = Glob.getTypes().getMLIRTypeForMem(ElementType);
26492649
if (CGM.getLangOpts().isSignedOverflowDefined()) {
26502650
if (Optional<Value> NewIndex =
26512651
castSubIndexOpIndex(Builder, Loc, Pointer, Index.val, IsSigned))

0 commit comments

Comments
 (0)