This is an archive of the discontinued LLVM Phabricator instance.

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

Authored by hans on Oct 23 2014, 3:01 PM.

Details

Summary

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.

Diff Detail

Repository
rL LLVM

Event Timeline

hans updated this revision to Diff 15350.Oct 23 2014, 3:01 PM
hans retitled this revision from to Don't emit strong vtable definitions for imported classes with key functions (PR21355).
hans updated this object.
hans edited the test plan for this revision. (Show Details)
hans added a reviewer: majnemer.
hans added subscribers: Unknown Object (MLST), hansw.
majnemer accepted this revision.Oct 23 2014, 3:40 PM
majnemer edited edge metadata.

LGTM

This revision is now accepted and ready to land.Oct 23 2014, 3:40 PM
hans closed this revision.Oct 23 2014, 3:51 PM
hans updated this revision to Diff 15357.

Closed by commit rL220532 (authored by @hans).