[Mlir-commits] [mlir] [mlir][LLVMIR] Add LLVMDialect check in `DIScopeForLLVMFuncOp` (PR #110427)

Christian Ulmann llvmlistbot at llvm.org
Wed Oct 2 23:34:46 PDT 2024


================
@@ -91,6 +91,10 @@ struct DIScopeForLLVMFuncOp
     Location loc = module.getLoc();
 
     MLIRContext *context = &getContext();
+    if (!context->getLoadedDialect<LLVM::LLVMDialect>()) {
+      emitError(loc, "LLVM dialect is not loaded.");
+      return;
----------------
Dinistro wrote:

Maybe also add a `signalPassFailure()` to ensure that a pipeline would stop here.

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


More information about the Mlir-commits mailing list