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

    <tr>
        <th>Summary</th>
        <td>
            [LLVM] ExecutionUnit/JITLink build error.
        </td>
    </tr>

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

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

    <tr>
      <th>Reporter</th>
      <td>
          carlo-bramini
      </td>
    </tr>
</table>

<pre>
    While compiling llvm-project for making the packages, which seems to use more strict options, I got this error:

```
/home/carlo/packages/llvm/llvm-18.0.0git-1.x86_64/src/llvm-project/llvm/lib/ExecutionEngine/JITLink/aarch32.cpp: In function ‘bool llvm::jitlink::aarch32::writeRegister(llvm::jitlink::aarch32::WritableThumbRelocation&, llvm::jitlink::aarch32::HalfWords)’:
/home/carlo/packages/llvm/llvm-18.0.0git-1.x86_64/src/llvm-project/llvm/lib/ExecutionEngine/JITLink/aarch32.cpp:182:1: error: no return statement in function returning non-void [-Werror=return-type]
  182 | }
      | ^
ninja: build stopped: subcommand failed.
```

The cause of the error is evident, since `writeRegister()` is declared for returning a bool:
https://github.com/llvm/llvm-project/blob/5ba906327b0178b7635baa89710eb2967db1aa18/llvm/lib/ExecutionEngine/JITLink/aarch32.cpp#L176
but at the end of the function, it does not return any value.
In my opinion, this may be a copy-paste error and replacing `bool` with `void` just solves the issue.
Both current head and branch-17.x are affected by this mistake.

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzMVU9v47YT_TT0ZWCBov4ffEg2MX75Ib0s0uZYDKmxxIQiBZJy4m9fULbjxaKHbU81DAlDcoZv3nukMAQ9WKIdq-5Z9bDBJY7O7xR647bS46St3kjXn3avozYEyk2zNtoOYMxx2s7evZGKcHAeJnxP43EkmFG940CBiW_wMWo1QiCaAkQHSyCYnCcI0WsVwc1RO7uufILBRYijDkDeO8-KO8YfGL8-a375n0OxH91ETOxXsEzsb7v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