[all-commits] [llvm/llvm-project] 854b1b: [DebugInfo] getMergedLocation: Maintain the line n...

Juan Manuel Martinez Caamaño via All-commits all-commits at lists.llvm.org
Tue Oct 25 07:13:58 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 854b1bca60ebb784e507e905885f4ba664bb65af
      https://github.com/llvm/llvm-project/commit/854b1bca60ebb784e507e905885f4ba664bb65af
  Author: Juan Manuel MARTINEZ CAAMAÑO <juamarti at amd.com>
  Date:   2022-10-25 (Tue, 25 Oct 2022)

  Changed paths:
    M llvm/include/llvm/IR/DebugInfoMetadata.h
    M llvm/lib/IR/DebugInfoMetadata.cpp
    A llvm/test/DebugInfo/return-same-line-merge.ll
    M llvm/unittests/IR/MetadataTest.cpp

  Log Message:
  -----------
  [DebugInfo] getMergedLocation: Maintain the line number if they match

getMergedLocation returns a 'line 0' DILocaiton if the two locations
being merged don't perfecly match, even if they are in the same line but
a different column.

This commit adds support to keep the line number if it matches (but only
the column differs). The merged column number is the leftmost between the
two.

Reviewed By: dblaikie, orlando

Differential Revision: https://reviews.llvm.org/D135166




More information about the All-commits mailing list