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

    <tr>
        <th>Summary</th>
        <td>
            bolt fails to build with `error: no member named 'getAsReference'`
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            build-problem,
            BOLT
      </td>
    </tr>

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

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

<pre>
    On linux Debian bullseye, full log:
https://llvm-jenkins.debian.net/job/llvm-toolchain-bullseye-binaries/architecture=amd64,distribution=bullseye,label=amd64/1342/console

```
/build/source/bolt/lib/Core/DIEBuilder.cpp:559:34: error: no member named 'getAsReference' in 'llvm::DWARFFormValue'; did you mean 'getAsReferenceUVal'?
  559 |   uint64_t RefOffset = *RefValue.getAsReference();
      | ^~~~~~~~~~~~~~
      | getAsReferenceUVal
/build/source/llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h:122:27: note: 'getAsReferenceUVal' declared here
  122 |   std::optional<uint64_t> getAsReferenceUVal() const;
      | ^
/build/source/bolt/lib/Core/DIEBuilder.cpp:610:29: error: no member named 'getAsReference' in 'llvm::DWARFFormValue'; did you mean 'getAsReferenceUVal'?
  610 |   const uint64_t Ref = *Val.getAsReference();
      | ^~~~~~~~~~~~~~
      | getAsReferenceUVal
/build/source/llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h:122:27: note: 'getAsReferenceUVal' declared here
  122 |   std::optional<uint64_t> getAsReferenceUVal() const;
      |                           ^
2 errors generated.
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzsVUtv8zYQ_DXrCxFBWuphHXSQrQj4gAIBgjY9FpS0sphSpMFH2lz62wvK8ZdHk0PRHnooYVjkcr2eGQ25wjl50kQNFAcoup0IfjG2cc_qiZy3tBvM9NzcaaakDr-zjgYpNBuCUo6eCfDI5qAUU-YEvIW0g7RdvD-7uMIesFfqab15JP2r1C6Ztp8nmjxg_2iG6743Ro2LkPrmWvlmkFpYSQ6wF3ZcpKfRB0vAO7FOZQ54nKTzVg7BS6OBd28wKTGQes3sM54jYD8a7YyiC8qX7zJ9-VyW2A9BqgmwdybYkWLAqIhWyYj2aGyMdd9uDzGPbDKez8DboqiBtzwH3jKy1tg40YattA5kmRYrTQywOpFv3T3NZEnH6hWTOsajClEy3nY_t_d9b-z6IFSIGcAPbJITezaBrST0X8v89CDUlthfWDBWFDWD6sgYC1L7Mv_Fs3ua7-bZkWfAOwbY3tO8_UXyEdMesAZ-uNaKI9aC4vaPt-Pj_ieYvtR0o4u91KMK05tAR0M4fdOzifMoxPX5XZBkAd5miMDbyDiK7Ck-v1KFTTQqYWliC1m6gs4QXwRyfroIb87RSEIBP15FA377Ga1NIRbd5D_X6R-aqczSSK_-j5ipzNIXrTbK7yx1NdODUP_76N_10dfju8PwYg_HTqTJCk9T8uFa200Nn2peix01WYVZxjGr6t3SEJb7lPZlivOeMhp5PediHIdMzGmZzfNONphinlZZmWFWZnUy1cW-2hdZhVNd74cK8pRWIVUSNU-MPe2kc4Gauk4x321XsNu6CuL23m7O1gyKVkAEPALi4e6HH-Oi6Ha22drAEE4O8lRJ591rWS-9oiaeHDYLqRzzhm0V2W_SLwzK9G8dkqhKsKp536ZO0i9hSEazvrpow3S25pHGeGg3erEfXRg-NfhnAAAA__-pujYe">