[llvm] [DebugInfo][RemoveDIs] Use autoupgrader to convert old debug-info (PR #143452)

Orlando Cazalet-Hyams via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 10 02:51:07 PDT 2025


================
@@ -0,0 +1,113 @@
+; RUN: opt %s -o /dev/null -S 2>&1 | FileCheck %s
+;
+; The last dbg.declare intrinsic in this file has an illegal DILocation -- this
+; needs to pass through the autoupgrade to #dbg_declare process and then get
+; caught by the verifier.
+;
+; CHECK:      invalid #dbg record DILocation
+; CHECK-NEXT: #dbg_declare(ptr %1, !61, !DIExpression(), !62)
+; CHECK-NEXT: !DISubprogram(name: "IgnoreIntrinsicTest",
+; CHECK-NEXT: label %0
+; CHECK-NEXT: ptr @IgnoreIntrinsicTest
+
+ at a = external global { i64, [56 x i8] }, align 32
+
+; Function Attrs: nounwind sspreq
+define i32 @_Z18read_response_sizev() #0 !dbg !9 {
+entry:
+  tail call void @llvm.dbg.value(metadata !22, i64 0, metadata !23, metadata !DIExpression()), !dbg !39
+  %0 = load i64, ptr @a, align 8, !dbg !40
+  tail call void @llvm.dbg.value(metadata i32 undef, i64 0, metadata !64, metadata !DIExpression()), !dbg !71
+  %1 = trunc i64 %0 to i32
+  ret i32 %1
+}
----------------
OCHyams wrote:

is the function above adding anything to the test?

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


More information about the llvm-commits mailing list