[all-commits] [llvm/llvm-project] 3123f2: [MergeFunctions] Add debug locations to redirected...

Mian Miftah via All-commits all-commits at lists.llvm.org
Mon Sep 28 04:01:00 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3123f219c9a536a586df1d253d13ec49ab95ca38
      https://github.com/llvm/llvm-project/commit/3123f219c9a536a586df1d253d13ec49ab95ca38
  Author: Mian Miftah <mmiftah.duna at gmail.com>
  Date:   2026-09-28 (Mon, 28 Sep 2026)

  Changed paths:
    M llvm/lib/Transforms/IPO/MergeFunctions.cpp
    A llvm/test/Transforms/MergeFunc/redirect-call-debug-loc.ll

  Log Message:
  -----------
  [MergeFunctions] Add debug locations to redirected calls (#225625)

A call to a function without debug info does not need a debug location,
even in a function with debug info. If MergeFunctions redirects such a
call to an equivalent function that has debug info, the verifier fails:

```
inlinable function call in a function with debug info must have a !dbg location
```

Before redirecting such a call, give it a line 0 location in the scope
of the caller, as `DwarfEHPrepare` does for the call to the rewind
function. This covers both ways calls are redirected:
`replaceDirectCallers()`, and `replaceAllUsesWith()` for `unnamed_addr`
functions.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list