[llvm-bugs] [Bug 33417] New: MS ABI: VTable Thunk not generated for imported class

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Jun 12 09:23:13 PDT 2017


            Bug ID: 33417
           Summary: MS ABI: VTable Thunk not generated for imported class
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: sb at miray.de
                CC: llvm-bugs at lists.llvm.org

Created attachment 18622
  --> https://bugs.llvm.org/attachment.cgi?id=18622&action=edit
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 at Object@@$4PPPPPPPM at A@AE?AV?$Ref at 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: http://llvm.org/pre-releases/win-snapshots/LLVM-5.0.0-r303050-win32.exe

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170612/8e23cc27/attachment.html>

More information about the llvm-bugs mailing list