[llvm-branch-commits] [llvm] [KeyInstr] Merge atoms in DILocation::getMergedLocation (PR #133480)

Jeremy Morse via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Apr 11 01:49:31 PDT 2025


================
@@ -226,8 +230,44 @@ DILocation *DILocation::getMergedLocation(DILocation *LocA, DILocation *LocB) {
     bool SameCol = L1->getColumn() == L2->getColumn();
     unsigned Line = SameLine ? L1->getLine() : 0;
     unsigned Col = SameLine && SameCol ? L1->getColumn() : 0;
-
-    return DILocation::get(C, Line, Col, Scope, InlinedAt);
+    bool IsImplicitCode = L1->isImplicitCode() && L2->isImplicitCode();
+    uint64_t Group = 0;
+    uint64_t Rank = 0;
+    if (SameLine) {
+      if (L1->getAtomGroup() || L2->getAtomGroup()) {
----------------
jmorse wrote:

Early-exit the lambda/delegate instead?

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


More information about the llvm-branch-commits mailing list