<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/86987>86987</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
ODR warning in MachineScheduler.h (GenericSchedulerBase)
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
efriedma-quic
</td>
</tr>
</table>
<pre>
When building with -flto -Werror=odr to find possible runtime issues w/ LTO:
```
/var/tmp/portage/sys-devel/llvm-18.1.0/work/llvm/include/llvm/CodeGen/MachineScheduler.h:1067: error: virtual table of type ‘struct GenericSchedulerBase’ violates one definition rule [-Werror=odr]
1067 | class GenericSchedulerBase : public MachineSchedStrategy {
|
/var/tmp/portage/sys-devel/llvm-18.1.0/work/llvm/include/llvm/CodeGen/MachineScheduler.h:1067: note: the conflicting type defined in another translation unit
1067 | class GenericSchedulerBase : public MachineSchedStrategy {
|
<built-in>: note: virtual method ‘__cxa_pure_virtual’
/var/tmp/portage/sys-devel/llvm-18.1.0/work/llvm/include/llvm/CodeGen/MachineScheduler.h:257: note: ought to match virtual method ‘scheduleTree’ but does not
257 | virtual void scheduleTree(unsigned SubtreeID) {}
|
```
Split from #84577 . Originally reported downstream in Gentoo at https://bugs.gentoo.org/926529.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzElE9v4zYQxT8NfRlYkEeWJR10SOJVUKBFgGaBPQaUOJbYUqRKDu3m2xdUnH_t7rVrGBREEY8zPz4-GYIeLVEryltRHjcy8uR8SyevSc1y-1fUw6Z36rn9NpGFPmqjtB3honmC7cmwg-038t55URyd8sAOTtoqWFwIujcEPlrWM4EOIVKAi8AOfv36IIobkR9F_joe8uv_5RW7s_QCO54Xgd3iPMuRBHbhOWwVnckI7Iw5z9tdne2yXGB3cf7P66TATtvBREXvE3dO0T1Zgd1vcpi0pcdhIhUN-WwSxc0uP1SiuIFrKzdw1p6jNMAyNeFOwM8LgfiCos5FUwf2cWC4J0teD29atzLQ65oGztoZyRTAWQJFJ201a2fBR0MgyttP5ER5fOkdUi0gqjsYjAzhu3tAKnGJvdEDfOznkb1kGp9BVLdXtfWX1H4yWeuY0pMngsHZk9EDJyetXFc4pEBbkNbxRB7YSxuMXIFFq_l_gVPcJYfzVltRfPlY9asdZuLJqXcfPD0Nf8unJXp6ui55O_6fxBvLT7hdHCdOt3KWPEw_7CNcNb56-mDgPjIoRyGpvRLD8oU_vGmdnVbwSQDraNdcUfAYe_ZEvxwFNiv46vgD9v9KgHV8XIxmOHk3g8Ci3pdVBRk8eD1qK415Bk-JKClQ7mIDe5JzMtE9WXYOJMPEvIQUNtgJ7Po4hmxcP2bOjwK7Bg8lNtlGtYVqikZuqN1Vu92h3BWHejO1BVJV5nssD40q9kVDuSxUXh9KlEQKcaNbzHGfF1jv6j3u64wG1VcHWRX5UKqib8Q-p1lqk6XzS7tu1ihs60NTVxsjezJhjV9ES5eXnBSIKY19uzojVS32udGBw7sKazbUPhx_h4v0Nl0lbeG_lgCB9XdjCptN9Kb9DGjUPMU-G9z8bri1hsW7P2jgZMg1yAV2awP_BAAA__-ojPvO">