[llvm-branch-commits] [llvm] [KeyInstr] Merge atoms in DILocation::getMergedLocation (PR #133480)
Stephen Tozer via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Apr 8 06:00:09 PDT 2025
================
@@ -189,11 +189,15 @@ DILocation *DILocation::getMergedLocation(DILocation *LocA, DILocation *LocB) {
// Merge the two locations if possible, using the supplied
// inlined-at location for the created location.
- auto MergeLocPair = [&C](const DILocation *L1, const DILocation *L2,
- DILocation *InlinedAt) -> DILocation * {
+ auto *LocAIA = LocA->getInlinedAt();
+ auto *LocBIA = LocB->getInlinedAt();
+ auto MergeLocPair = [&C, LocAIA,
+ LocBIA](const DILocation *L1, const DILocation *L2,
+ DILocation *InlinedAt) -> DILocation * {
if (L1 == L2)
return DILocation::get(C, L1->getLine(), L1->getColumn(), L1->getScope(),
- InlinedAt);
+ InlinedAt, L1->isImplicitCode(),
----------------
SLTozer wrote:
Technically copying `L1->isImplicitCode()` here is a change in behaviour - normally that flag would be effectively dropped here.
https://github.com/llvm/llvm-project/pull/133480
More information about the llvm-branch-commits
mailing list