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

    <tr>
        <th>Summary</th>
        <td>
            ODR warnings in lldb/include/lldb/Utility/Cloneable.h
        </td>
    </tr>

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

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

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

<pre>
    When building with `-flto -Werror=odr` to find possible runtime issues w/ LTO:
```
/var/tmp/portage/dev-debug/lldb-17.0.6/work/lldb/include/lldb/Utility/Cloneable.h:40: error: virtual table of type ‘struct Cloneable’ violates one definition rule [-Werror=odr]
   40 | class Cloneable : public Base {
/var/tmp/portage/dev-debug/lldb-17.0.6/work/lldb/include/lldb/Utility/Cloneable.h:40: note: the conflicting type defined in another translation unit
   40 | class Cloneable : public Base {
<built-in>: note: virtual method ‘__cxa_pure_virtual’
/var/tmp/portage/dev-debug/lldb-17.0.6/work/lldb/include/lldb/Interpreter/OptionValue.h:93:29: note: ought to match virtual method ‘ToJSON’ but does not
   93 |   virtual llvm::json::Value ToJSON(const ExecutionContext *exe_ctx) {
      |                             ^
/var/tmp/portage/dev-debug/lldb-17.0.6/work/lldb/include/lldb/Utility/Cloneable.h:40: error: virtual table of type ‘struct Cloneable’ violates one definition rule [-Werror=odr]
   40 | class Cloneable : public Base {
/var/tmp/portage/dev-debug/lldb-17.0.6/work/lldb/include/lldb/Utility/Cloneable.h:40: note: the conflicting type defined in another translation unit
   40 | class Cloneable : public Base {
<built-in>: note: virtual method ‘__cxa_pure_virtual’
/var/tmp/portage/dev-debug/lldb-17.0.6/work/lldb/include/lldb/Interpreter/OptionValue.h:93:29: note: ought to match virtual method ‘ToJSON’ but does not
   93 |   virtual llvm::json::Value ToJSON(const ExecutionContext *exe_ctx) {
      |                             ^
/var/tmp/portage/dev-debug/lldb-17.0.6/work/lldb/include/lldb/Utility/Cloneable.h:40: error: virtual table of type ‘struct Cloneable’ violates one definition rule [-Werror=odr]
   40 | class Cloneable : public Base {
/var/tmp/portage/dev-debug/lldb-17.0.6/work/lldb/include/lldb/Utility/Cloneable.h:40: note: the conflicting type defined in another translation unit
   40 | class Cloneable : public Base {
/var/tmp/portage/dev-debug/lldb-17.0.6/work/lldb/include/lldb/Interpreter/OptionValue.h:93:29: note: virtual method ‘ToJSON’
   93 |   virtual llvm::json::Value ToJSON(const ExecutionContext *exe_ctx) {
      |                             ^
<built-in>: note: ought to match virtual method ‘__cxa_pure_virtual’ but does not
/var/tmp/portage/dev-debug/lldb-17.0.6/work/lldb/include/lldb/Utility/Cloneable.h:40: error: virtual table of type ‘struct Cloneable’ violates one definition rule [-Werror=odr]
   40 | class Cloneable : public Base {
/var/tmp/portage/dev-debug/lldb-17.0.6/work/lldb/include/lldb/Utility/Cloneable.h:40: note: the conflicting type defined in another translation unit
   40 | class Cloneable : public Base {
/var/tmp/portage/dev-debug/lldb-17.0.6/work/lldb/include/lldb/Interpreter/OptionValue.h:93:29: note: virtual method ‘ToJSON’
   93 |   virtual llvm::json::Value ToJSON(const ExecutionContext *exe_ctx) {
      |                             ^
<built-in>: note: ought to match virtual method ‘__cxa_pure_virtual’ but does not
[...]
```

Originally reported downstream at https://bugs.gentoo.org/858389.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzsmFGv4jYThn-NczMiCnYC5CIXnMOJ9H2qitRuu5fIiYfEW2NH9gQ4_75y4MBu1VNtK1XblYiAQEjezLwzz0iODEF3FrFixRMrNokcqXe-oh6DPMR30jj1Wn3s0UIzaqO07eCkqQe2yGZ7Qw5mH9F755nYOOXZIgNysNdWweBC0I1B8KMlfUDQIYwY4MR4DT982DKxZtmGZWu2yK6vy09eH6VnvKbDwHg9OE-yQ8ZrhceZwmbsGK-NUc1svkyzdMF4fXL-t-tBxmttWzMqvB_4hbTR9Mp4_WycRdkYTHsm1nnG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