[lld] [lld-macho] Fix invalid DWARF with --icf=safe_thunks (PR #111097)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 4 11:10:03 PDT 2024
================
@@ -49,127 +62,179 @@
; CHECK-ARM64-MAP-NEXT: 0x00000004 [ 2] _func_3identical_v2
; CHECK-ARM64-MAP-NEXT: 0x00000004 [ 2] _func_3identical_v3
+; ModuleID = 'icf-safe-thunks.cpp'
+source_filename = "icf-safe-thunks.cpp"
target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128-Fn32"
target triple = "arm64-apple-macosx11.0.0"
-
- at g_val = global i8 0, align 1
- at g_ptr = global ptr null, align 8
-
+ at g_val = global i8 0, align 1, !dbg !0
+ at g_ptr = global ptr null, align 8, !dbg !7
; Function Attrs: mustprogress nofree noinline norecurse nounwind ssp memory(readwrite, argmem: none) uwtable(sync)
-define void @func_unique_1() #0 {
+define void @func_unique_1() #0 !dbg !19 {
----------------
alx32 wrote:
I am not sure llvm-reduce would help here. The test is an existing minimal test that checks functionality - it can't be reduced any further without removing scenarios that need to be covered - i.e. it's preventing regressions rather than trying to reproduce a specific bug.
This change just adds debug info to the test in order to repro the bug.
I guess the alternative would be to create a new separate test that just reproduces the bug and doesn't also serve as a feature test. Would that be better ?
https://github.com/llvm/llvm-project/pull/111097
More information about the llvm-commits
mailing list