<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - MS ABI: VTable Thunk not generated for imported class"
   href="https://bugs.llvm.org/show_bug.cgi?id=33417">33417</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>MS ABI: VTable Thunk not generated for imported class
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>-New Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>sb@miray.de
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=18622" name="attach_18622" title="Example projects to reproduce bug">attachment 18622</a> <a href="attachment.cgi?id=18622&action=edit" title="Example projects to reproduce bug">[details]</a></span>
Example projects to reproduce bug

The attached example (VS2013 solution/projects) generates a linker error when
the project "thunktest" is compiled with Clang instead of MSVC (the setting for
the "system" project does not matter).

The error is: 
1>main.obj : error LNK2001: Nicht aufgelöstes externes Symbol ""[thunk]:public:
virtual class Ref<class Object> __thiscall Object::obj`vtordisp{4294967292,0}'
(void)" (?obj@Object@@$4PPPPPPPM@A@AE?AV?$Ref@VObject@@@@XZ)".

This occurs if the class Object is imported from another binary. Inside the
same binary this error does not occur.

The same code compiles with MSVC (default setting of the projects) as well with
Clang on Linux (the contained Makefile is for the latter case).

The LLVM/Clang installation is a snapshot of revision r303050 downloaded from
here: <a href="http://llvm.org/pre-releases/win-snapshots/LLVM-5.0.0-r303050-win32.exe">http://llvm.org/pre-releases/win-snapshots/LLVM-5.0.0-r303050-win32.exe</a></pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>