[Mlir-commits] [mlir] [mlir][debug] Convert DbgIntrOp to DebugRecords directly. (PR #154926)
Andy Kaylor
llvmlistbot at llvm.org
Mon Aug 25 13:25:41 PDT 2025
================
@@ -711,6 +695,28 @@ def LLVM_DbgDeclareOp : LLVM_DbgIntrOp<"dbg.declare", "addr", [
LLVM_DILocalVariableAttr:$varInfo,
DefaultValuedAttr<LLVM_DIExpressionAttr, "{}">:$locationExpr
);
+ let llvmBuilder = [{
+ // Debug intrinsics without debug locations are invalid.
+ if(!builder.getCurrentDebugLocation())
+ return success();
----------------
andykaylor wrote:
Would it be reasonable to report an error here? If this is "invalid" as the comment says, silently ignoring it doesn't seem like the right behavior.
https://github.com/llvm/llvm-project/pull/154926
More information about the Mlir-commits
mailing list