================
@@ -1123,8 +1123,12 @@ static mlir::Attribute createNewGlobalView(CIRGenModule
&cgm,
else if (isa<cir::ArrayType>(oldTy))
newPtrTy = cast<cir::PointerType>(attr.getType());
- if (newPtrTy)
- return bld.getGlobalViewAttr(newPtrTy, newGlob, newInds);
+ if (newPtrTy) {
+ cir::GlobalViewAttr view =
+ bld.getGlobalViewAttr(newPtrTy, newGlob, newInds);
+ return cir::GlobalViewAttr::get(view.getType(), view.getSymbol(),
----------------
andykaylor wrote:
What is the purpose of the intermediate `view` attribute? Could you add a new
overload of `getGlobalViewAttr` that takes the address point parameter?
https://github.com/llvm/llvm-project/pull/227520
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits