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

    <tr>
        <th>Summary</th>
        <td>
            Improve llvm-ar member list output for thin archives
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            tools:llvm-ar/llvm-ranlib
      </td>
    </tr>

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

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

<pre>
    The `t` option for llvm-ar displays a list of files in an archive. In the case of relative members in thin archives this just amends the stored path to the end of the path of the archive location given on the command line. See `thin-archive-relative-path.test` for an example of this:
- Member path is stored in the archive as `../bar/elf.o/`
- Archive path was given on the command line as `foo/lib.a`
- Output path with `t` is `foo/../bar/elf.o`
- Ideally the path would instead be output as `bar/elf.o`

This example is trivial but when using longer relative paths it may not be clear to the user. With the functions we already have for managing relative paths we should be able to reduce the output paths down to be easier to read.

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx1U02PozAM_TVwsYqAUloOHLoajdTDag870p4NGMgoJCgJ0-2_XyfQ6czujsRHEtvP79lOo7tb_TISRGXq-AU9O6EV9NqAlG_TDg10ws4SbxYQpLAOdA-9kGRBKEB-TDuKN0rgosAxUouWvI8hiY4NMNHUkAnubhTvAdbvLLwuDIkTqc6GcOu0oQ5mdCM4HY7Y5gH9Mhxv6w0HpG4xkB54p0BvNPQ0IQdKoZjbT1olcv7dFre7E9x50MSRDQXwylkV_cZplrTmEjban6P0KUrPO_ge5KxMmP_GV6hPnND6dEkS5c8NGv6S7BPNfz69A50334B05Ygv-W9wvfYIUjQJfoD5sbh5cRuK4M-9leJD0D9MHvGXjlDK26O8V71IL8g6wg4arsGaYSXxP5D1--Lbea8bL50RbwIlNBx7HVnZYoUauF1q4Pq9j4fPycPhYMIbKO18xlYSD97W_sWSSeCXl-a3_aJa324LVy6MNEzyBiMykm8d1wwHn-YvfPa1YxDG8NgwQ0bnxi0tBVT9qKKFTl-Vt7MroRVkVmfsklVpTHVWllVaFIfyFHf1vqv2FcZOOEn1ZZqN9mO5XZ91_Lers2bxRD9dhXgxsh6dm8Og8ZTkzwPrXZqEx8D3nLG2347RX6l1vBXWLmR5caiyLIvH-nQsuqbK066ktMQeyz4_nggPbXksiuyYxhIbkraODt-iPHdaS59vI3rHN6h4xNgeHZ5iUedpnmcZP4e8yk9JWzLovin2xR7TtqqiIqUJhUx8bKLNEJs6wDTLYNnoZduHEa0VgyIKFBgfFzdqUw-NoZvSOg6S6qDnD3cOjJE">