https://bugs.llvm.org/show_bug.cgi?id=33417

            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: unassignedclangb...@nondot.org
          Reporter: s...@miray.de
                CC: llvm-bugs@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@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: 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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to