[PATCH] Don't emit strong vtable definitions for imported classes with key functions (PR21355)

Hans Wennborg hans at chromium.org
Thu Oct 23 15:01:36 PDT 2014


Hi majnemer,

Clang would previously assert on the following code when targeting MinGW:

  struct __declspec(dllimport) S {
    virtual ~S();
  };
  S::~S() {}

Because ~S is a key function and the class is dllimport, we would try to emit a strong definition of the vtable, with dllimport - which is a conflict. We should not emit strong vtable definitions for imported classes.

http://reviews.llvm.org/D5944

Files:
  lib/CodeGen/CGVTables.cpp
  test/CodeGenCXX/dllimport.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5944.15350.patch
Type: text/x-patch
Size: 1508 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20141023/242582a0/attachment.bin>


More information about the cfe-commits mailing list