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

    <tr>
        <th>Summary</th>
        <td>
            [DWARF] DWARFDie::getDeclFile() doesn't work with DW_FORM_implicit_const
        </td>
    </tr>

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

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

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

<pre>
    DWARFDie::getDeclFile() gets an invalid DWARFFormValue without a DWARFUnit* as DWARFAbbreviationDeclaration::getAttributeValueFromOffset() doesn't pass it in DWARFFormValue::createFromSValue().
Can be checked with DWARFDie::dump(). It works correctly as it gets a referenced value, not a lazy copy.
getDeclFile in DWARFDieTest.cpp has a value stored in DW_FORM_data1, so it passes.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyEUktvnDAQ_jXmMgrCBnbDgQPNCqmHKlL6OkbGngU3BiN72Gj76yubbdL20hOPmfkeM58MwYwLYsvqD6w-ZXKjyfk2oB_xWvKK1404ZIPT1_b0vXvqTwZZ2bGyG5FOqGxvLDJxz0QDI1IAuYBZLtIaDam_d37-Ju2G8GpochuB3AtfF0NMdCDD_t0Ng8eLkWTcEoGlT69vZB2RN8NGmNB67-bH8zkg3ci1w7AwcSRYZQhgCMzyj4IdSnmUlOY_73_TfM6K7kEuMCCoCdUL6qQX_vast3m99cNHglfnXwIo5z0qstdoxdBtDeDxjB4XhRouO88DLC7at_LnFZRbr5H0jzW-KT4Z_IKBcrWuMMkIlhAgkPOo97bn_vHp07OWJHlEDi5SR-sY8ky3pW7KRmbY8uOhaeqqaqpsaofmXDfI77muyqKQR3kQQmGjZX1f6kEPmWlFIQ6FKDivCl6WOT8cNR55Kc-qPhyrhlUFztLY3NrLnDs_ZiaELdI0nBeZlQPakLIkxIKvkKpMiBgt38ahu2EbA6sKawKFdxgyZFMI0wZYfYL_xe394vEOv8-178XMqzXK0LNyS6Bs87adiNYQsUTPRD8amrYhV25moo8ibo-71bsfqIiJPkkPTPQ3b5dW_AoAAP__ZNgGzQ">