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

    <tr>
        <th>Summary</th>
        <td>
            BPF backend should not read source file paths during codegen
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            backend:BPF
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
            yonghong-song
      </td>
    </tr>

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

<pre>
    [This BPF code](https://github.com/llvm/llvm-project/blob/6f071911010323f23f45eadff0d037b1d04a8e7d/llvm/lib/Target/BPF/BTFDebug.cpp#L893-L904) is problematic. It reads source paths specified in the LLVM IR debug info from disk, and writes them through to the assembly. It makes the LLVM IR non-hermetic. If the BPF backend needs the source, it should be passed through the IR.

I encountered this because my test suite failed because I had a file at /tmp/t.c, and BPF tests started to fail. This took me a while to figure out, and I apologize if I'm a little grumpy about it.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyVU01vozAQ_TVwGQUZE0o4cGi3qhQpK62qau_GHoMbwMgfW2V__Y5J0va6khljj-e9N-Nxb9Wly-qnt9F4ePr1AtIqzOrnjB_GEFafVY8Zf6ExmDDGvpB2psU0_blPu9XZd5SBlv1ke5oeNGvKtixZySpeaRr7GoXSmilWNX2p2F4csFHfcEyKexNuwIRDMpJ9e3nGPg6FXNeMV6dDW-1OLdtnvAXSSrT9hLMIRhZwDOCIwoO30UmEVYSRFitKow0qMAuEEeF0-v0Tjq-gEi5tagva2RmU8eeM_wCxKPhwJqBPx2cyzsZhhGC3cOE9zv102fhmcb4e-0Rd7LIb0c14laQ3ZyppL-QZCXpBVNeQq8xEaQL40cZJQZ9kE4P6oqWTx9ciY88Ze7zaI-AibVwCuu0gFaJHKaJHmC9AwgkuUgKghZlQfTqPMAoFAjTtgghA9Q3zmmwh75knqQmBCheECwnfbjgFbN0RrD3DTOHwMSaY5DVDdAg2hjvIEcRqJzuYvwhGwzHjzUwRkwmBQgYX5_UCoqcISr3IVVeptmpFHgz5u-_VupVlsde7vV_tlsH1flV0Zhm2jh1wyaObuv_uWeN9RE8_9Z61PB87eRD6gFiXZaUe6obputWSPdSikY1gWueT6HHy6c1knN_EEuPWtJxeTm46zngaNef7llfFgSNTldjLUmEj6jLbM2pcqmvSUlg35K7bZFFXenJOhi7hy0lNYQbqnRvlxS7DSN_Ok7lRihhG6zq3nPMtoW7L5h8Bh0Wo">