================
@@ -1585,6 +1585,11 @@ LValue CIRGenFunction::emitStringLiteralLValue(const
StringLiteral *e,
unsigned align = *(globalOp.getAlignment());
mlir::Value addr =
builder.createGetGlobal(getLoc(e->getSourceRange()), globalOp);
+ cir::PointerType destPtrTy =
+ builder.getPointerTo(globalOp.getSymType(),
+
cgm.getTypes().getPointerAddressSpace(e->getType()));
+ if (addr.getType() != destPtrTy)
----------------
Fznamznon wrote:
I wonder if we should compare address spaces rather than types and create
`destPtrTy` variable only if there is a mismatch.
https://github.com/llvm/llvm-project/pull/226996
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits