Skip to content

Commit 15e0f6a

Browse files
committed
Add const to clangPtrTy
1 parent 1ae907e commit 15e0f6a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

clang/lib/CIR/CodeGen/CIRGenExpr.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1178,7 +1178,8 @@ LValue CIRGenFunction::emitExtVectorElementExpr(const ExtVectorElementExpr *e) {
11781178
// it.
11791179
LValueBaseInfo baseInfo;
11801180
Address ptr = emitPointerWithAlignment(e->getBase(), &baseInfo);
1181-
auto *clangPtrTy = e->getBase()->getType()->castAs<clang::PointerType>();
1181+
const auto *clangPtrTy =
1182+
e->getBase()->getType()->castAs<clang::PointerType>();
11821183
base = makeAddrLValue(ptr, clangPtrTy->getPointeeType(), baseInfo);
11831184
base.getQuals().removeObjCGCAttr();
11841185
} else if (e->getBase()->isGLValue()) {

0 commit comments

Comments
 (0)