An enum class has associated type info. In the Microsoft ABI, type info
is emitted in the COMDAT section and isn't exported, so clang rightfully
complains about __declspec(dllexport) being unused for an enum class.
On other platforms, we still want to export the type info.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
include/__config | ||
---|---|---|
719 ↗ | (On Diff #69786) | I don't think that this is right. On non-Windows, this would potentially expand out to __attribute__ (( __type_visibility__ ("default") )). I don't believe that enum classes have anything like RTTI associated with them, so we don't really want type visibility for that. |
include/__config | ||
---|---|---|
719 ↗ | (On Diff #69786) | Good point. Should I just drop the visibility macro entirely then? |
include/__config | ||
---|---|---|
719 ↗ | (On Diff #69786) | I think that might be the correct approach here. The definition will be inlined in the header, so the values should always be available, so the visibility attributes shouldn't change anything anyways. |
Comment Actions
Ugh, I was wrong. There is type information associated with a scoped enum. This means that _LIBCPP_TYPE_VIS is the right annotation here.