This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] Fix the type attribute for a couple templates
ClosedPublic

Authored by mstorsjo on Apr 6 2021, 1:57 AM.

Details

Summary

Use _LIBCPP_TEMPLATE_VIS instead of _LIBCPP_TYPE_VIS for a template class.

This fixes the nodiscard_extensions.pass.cpp and a couple func.search.default test cases when built in MSVC/DLL configurations.

Diff Detail

Event Timeline

mstorsjo requested review of this revision.Apr 6 2021, 1:57 AM
mstorsjo created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptApr 6 2021, 1:57 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript

Could you fix the same thing in experimental/functional as well when you're here?
Also, shouldn't boyer_moore_searcher and boyer_moore_horspool_searcher (in <experimental/functional>) and in_place_index_t (in <utility>) be affected as well?

Could you fix the same thing in experimental/functional as well when you're here?

Sure

Also, shouldn't boyer_moore_searcher and boyer_moore_horspool_searcher (in <experimental/functional>) and in_place_index_t (in <utility>) be affected as well?

Yes, so it seems. FWIW the experimental library can only be built as a static library, so that's not tested in the current CI setup (but I'm experimenting with extending testing with a static library case as well, which would increase coverage over a few more testcases, and narrow down a number of the existing xfails), but in a static library configuration on windows, both _LIBCPP_TYPE_VIS and _LIBCPP_TEMPLATE_VIS expand to nothing at all, so the distinction isn't quite as easy to pick up on. And I didn't find any test with an XFAIL regarding in_place_index_t, but let's see what another round through the CI says...

mstorsjo updated this revision to Diff 335466.Apr 6 2021, 4:00 AM

Remove XFAILs from more tests, fix the attribute on a couple more classes.

mstorsjo retitled this revision from [libcxx] Fix the type attribute for the default_searcher template to [libcxx] Fix the type attribute for a couple templates.Apr 6 2021, 4:00 AM
mstorsjo edited the summary of this revision. (Show Details)
curdeius accepted this revision as: curdeius.Apr 6 2021, 4:40 AM

LGTM. Thanks!

Quuxplusone accepted this revision.Apr 6 2021, 8:16 AM
This revision is now accepted and ready to land.Apr 6 2021, 8:16 AM
This revision was landed with ongoing or failed builds.Apr 6 2021, 9:55 AM
This revision was automatically updated to reflect the committed changes.