<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/69889>69889</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            -fstack-usage print incorrect source file names
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          sinelaw
      </td>
    </tr>
</table>

<pre>
    Instead of printing include file names, it always prints the main source file names. This is inconsistent with gcc and makes the output ambiguous.

gcc:

`echo 'void foo(void); void foo(void) { }' > test.inc && echo '#include "test.inc"' > test.c && gcc -fstack-usage -c test.c -o test.o && cat test.su`

output: `test.inc:1:22:foo       16      static`

clang:

`echo 'void foo(void); void foo(void) { }' > test.inc && echo '#include "test.inc"' > test.c && clang-15 -fstack-usage -c test.c -o test.o && cat test.su`

output: `test.c:1:foo    8       static`



</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzMU8GOnDoQ_Jrm0hpk2gMDBw6zb95IuecHjDHgrLFHtL2j_fsI2NnsZqXcIgUh22qqi66SSzHb0RvTQvkE5SVTKU5hadl649Q960L_2n7zHI3qMQx4W6yP1o9ovXapNzhYZ9Cr2TDQf2gjKndXr7wDGeNkcFbWI4e06I_wHL9PlnF9vQ6eLUfjI95tnHDUGpXvcVbPZucIKd5SRDV3dkwhcQ7iAuK8r6PWIM8fK1AJo6eAQKeXYHscQgCq1yNQA_IJv1YRTk8IpwvQCUH-j9FwzK3XCFQBVfjgA5IP7UD0QAHRp8b3tlXKYeCo9PMhsRoNHvQDcgj7KTzAWsW9wgkq8VHQrh_kGaES7z-V5wLkmQjkeQgB96eo9p2jilb_xqOd8uM_a9Y23aEo_45jD7_erKrxDz7ta9a3sm9kozLTFlVTC0GVENnUNkpRXXelLKgSx3IoB62aSvVKFGVR15TZlgTJQhAVDUkSuRqOUgzFSZu662TXw1GYWVmXO_cy52EZM8ucTFs1dd1kTnXG8ZZJIm_uuH1cfSsv2dKuPYcujQxH4SxH_sUSbXSm_ezflsUtZstidPyaxSwtrp1ivPF6NegKdB1tnFKX6zADXVf2t-1wW8IPoyPQdZuJga7bzD8DAAD__4zRTB8">