[llvm] [DebugInfo] Assign best possible debugloc to bundle (PR #164573)
Orlando Cazalet-Hyams via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 4 07:06:26 PST 2025
================
@@ -83,15 +83,20 @@ llvm::createUnpackMachineBundles(
return new UnpackMachineBundles(std::move(Ftor));
}
-/// Return the first found DebugLoc that has a DILocation, given a range of
-/// instructions. The search range is from FirstMI to LastMI (exclusive). If no
-/// DILocation is found, then an empty location is returned.
+/// Return the first good DebugLoc that has line number information, given a
+/// range of instructions. The search range is from FirstMI to LastMI
+/// (exclusive). If no such DebugLoc is found, get the one with DILocation
----------------
OCHyams wrote:
```suggestion
/// Return the first DebugLoc that has line number information, given a
/// range of instructions. The search range is from FirstMI to LastMI
/// (exclusive). Otherwise return the first DILocation or an empty location if
/// there are none.
```
nit: I think the term "good" could be ambiguous and we could be a bit more precise about what's happening
https://github.com/llvm/llvm-project/pull/164573
More information about the llvm-commits
mailing list