[Mlir-commits] [mlir] [mlir][debug] Convert DbgIntrOp to DebugRecords directly. (PR #154926)

Abid Qadeer llvmlistbot at llvm.org
Tue Sep 2 04:45:45 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();
----------------
abidh wrote:

I was looking at changing this to an error and noticed that the behavior is intentional. It was requested in https://github.com/llvm/llvm-project/issues/60222 and implemented in https://github.com/llvm/llvm-project/pull/70643.

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


More information about the Mlir-commits mailing list