[all-commits] [llvm/llvm-project] caf5b6: [bolt] Fix MSVC builds

Shoaib Meenai via All-commits all-commits at lists.llvm.org
Tue Jul 11 09:39:58 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: caf5b6a2121751ec6f0e9bf7c7984be229c685cc
  Author: Shoaib Meenai <smeenai at fb.com>
  Date:   2023-07-11 (Tue, 11 Jul 2023)

  Changed paths:
    M bolt/include/bolt/Core/DIEBuilder.h

  Log Message:
  [bolt] Fix MSVC builds

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

Reviewed By: ayermolo, maksfb

Differential Revision: https://reviews.llvm.org/D154924

More information about the All-commits mailing list