[Mlir-commits] [lld] [llvm] [mlir] [DebugInfo] Verify DISubprogram has a type (PR #194556)
Jiang Ning
llvmlistbot at llvm.org
Tue Apr 28 20:14:24 PDT 2026
================
@@ -0,0 +1,27 @@
+; Verify that DISubprogram requires a non-null DISubroutineType for its
+; `type:` field. See https://github.com/llvm/llvm-project/issues/186557.
+
+; RUN: opt -passes=verify -disable-output < %s
+; RUN: sed -e 's/type: !3/type: null/' %s | llvm-as -disable-output 2>&1 | FileCheck %s --check-prefix=NULL
+; RUN: sed -e 's/type: !3, //' %s | opt -passes=verify -disable-output 2>&1 | FileCheck %s --check-prefix=MISSING
+; RUN: sed -e 's/type: !3/type: !1/' %s | llvm-as -disable-output 2>&1 | FileCheck %s --check-prefix=INVALID
----------------
JiangNingHX wrote:
Thanks, that makes sense. I’ll rewrite the verifier test to avoid `sed` and cover the different invalid `type:` cases directly.
https://github.com/llvm/llvm-project/pull/194556
More information about the Mlir-commits
mailing list