已合并
fix(chir): pass source location to VARRAY_GET in compound assign to avoid ICE #1934
fix(chir): pass source location to VARRAY_GET in compound assign to avoid ICE #1934
已合并
wangyinqiang创建于 7月17日
共 1 个文件变更+1-1
@@ -83,7 +83,7 @@ Value* Translator::TranslateVArrayAssign(const AssignExpr& assign)
83 .kind = IntrinsicKind::VARRAY_GET,83 .kind = IntrinsicKind::VARRAY_GET,
84 .args = std::vector<Value*>({loadLHSValue->GetResult(), index})84 .args = std::vector<Value*>({loadLHSValue->GetResult(), index})
85 };85 };
86- auto lhs = CreateAndAppendExpression<Intrinsic>(lhsType, arrGetContext, currentBlock)->GetResult();86+ auto lhs = CreateAndAppendExpression<Intrinsic>(loc, lhsType, arrGetContext, currentBlock)->GetResult();
87 if (assign.op == TokenKind::AND_ASSIGN) {87 if (assign.op == TokenKind::AND_ASSIGN) {
88 auto res = TransShortCircuitAnd(lhs, *assign.rightExpr, loc);88 auto res = TransShortCircuitAnd(lhs, *assign.rightExpr, loc);
89 CreateAndAppendVArraySet(*lhsBase, *res, *index, *lhsType, loc);89 CreateAndAppendVArraySet(*lhsBase, *res, *index, *lhsType, loc);