[Mlir-commits] [mlir] [mlir][LLVMIR] Add LLVMDialect check in `DIScopeForLLVMFuncOp` (PR #110427)
Longsheng Mou
llvmlistbot at llvm.org
Thu Oct 3 02:07:25 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;
----------------
CoTinker wrote:
Good idea.
https://github.com/llvm/llvm-project/pull/110427
More information about the Mlir-commits
mailing list