This is an archive of the discontinued LLVM Phabricator instance.

system_error: inline error_category ctor on Win32
AbandonedPublic

Authored by compnerd on Jan 1 2017, 2:33 PM.

Details

Summary

Because the class is marked as dllexport and instantiated in
algorithm.cpp and is strongly defined in system_error.cpp, we end up
with multiple definitions. By keeping the definition as an inline
definition, the dllexport will instantiate it. Being inlined, they
will be marked as COMDAT(SELECT_ANY) and will still be exported from the
dll.

Diff Detail

Repository
rL LLVM

Event Timeline

compnerd updated this revision to Diff 82788.Jan 1 2017, 2:33 PM
compnerd retitled this revision from to system_error: inline error_category ctor on Win32.
compnerd updated this object.
compnerd added reviewers: EricWF, mclow.lists, majnemer.
compnerd set the repository for this revision to rL LLVM.
compnerd added subscribers: smeenai, cfe-commits.
EricWF edited edge metadata.Jan 2 2017, 2:29 PM

I committed a different fix for this patch in r290840.

Instead of just fixing this on Windows it makes the removal of this definition an ABI option, which it then disables on Windows by default.

compnerd abandoned this revision.Jan 2 2017, 2:40 PM

WFM, that seems like a nicer option.