================
@@ -1052,9 +1052,8 @@ mlir::Value CIRAttrToValue::visitCirAttr(cir::VTableAttr 
vtableArr) {
 /// ZeroAttr visitor.
 mlir::Value CIRAttrToValue::visitCirAttr(cir::ZeroAttr attr) {
   mlir::Location loc = parentOp->getLoc();
-  mlir::DataLayout layout(parentOp->getParentOfType<mlir::ModuleOp>());
-  return mlir::LLVM::ZeroOp::create(
-      rewriter, loc, convertTypeForMemory(*converter, layout, attr.getType()));
+  mlir::Type llvmTy = converter->convertType(attr.getType());
----------------
AmrDeveloper wrote:

Oops, I forgot that we don't have a test for that case, I will change the 
solution and add test for global var

https://github.com/llvm/llvm-project/pull/217885
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to