[Mlir-commits] [mlir] [MLIR][LLVMIR] Issue when importing LLVM modules which contain LandingPad Instructions (PR #171107)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Mon Dec 8 03:46:50 PST 2025


================
@@ -1765,17 +1765,25 @@ FailureOr<Value> ModuleImport::convertConstant(llvm::Constant *constant) {
     return lookupValue(inst);
   }
 
+  // Convert zero-initialized aggregates to ZeroOp.
+  if (auto *aggregateZero = dyn_cast<llvm::ConstantAggregateZero>(constant)) {
+    Type type = convertType(aggregateZero->getType());
+    return builder.create<ZeroOp>(loc, type).getResult();
----------------
Men-cotton wrote:

It looks like the build is failing because `builder.create<...>` is deprecated for these ops.
According to the error message, please replace `builder.create<ZeroOp>(...)` with `ZeroOp::create(builder, ...)` (and similarly for `UndefOp`) to fix the compilation errors.

https://github.com/llvm/llvm-project/pull/171107


More information about the Mlir-commits mailing list