This is an archive of the discontinued LLVM Phabricator instance.

[bolt] Fix MSVC builds
ClosedPublic

Authored by smeenai on Jul 11 2023, 12:34 AM.

Details

Summary

We need to explicitly mark DWARFUnitInfo as non-copyable since MSVC's
STL has a noexcept(false) move constructor for unordered_map; see
the added comment for more details.

An alternative might be using SmallVector instead of std::vector, since
that never tries to copy elements [1]. That would result in a bunch of
API changes though, so I figured a smaller targeted fix was better.

[1] https://llvm.org/docs/ProgrammersManual.html#llvm-adt-smallvector-h

Diff Detail

Event Timeline

smeenai created this revision.Jul 11 2023, 12:34 AM
Herald added a project: Restricted Project. · View Herald Transcript
Herald added a subscriber: treapster. · View Herald Transcript
smeenai requested review of this revision.Jul 11 2023, 12:34 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 11 2023, 12:34 AM
maksfb accepted this revision.Jul 11 2023, 12:55 AM

Thanks for the fix and the detailed info.

This revision is now accepted and ready to land.Jul 11 2023, 12:55 AM
ayermolo accepted this revision.Jul 11 2023, 7:02 AM

thanks for the fix

This revision was automatically updated to reflect the committed changes.