[all-commits] [llvm/llvm-project] 652e04: [MC] Add default ctor to SubtargetSubTypeAliasKV f...

Ramon Munoz Jr via All-commits all-commits at lists.llvm.org
Thu Jul 30 23:25:14 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 652e04312e8c5f4fc90ac16be494c3562c111ab9
      https://github.com/llvm/llvm-project/commit/652e04312e8c5f4fc90ac16be494c3562c111ab9
  Author: Ramon Munoz Jr <ramon.g.munoz.jr at intel.com>
  Date:   2026-07-31 (Fri, 31 Jul 2026)

  Changed paths:
    M llvm/include/llvm/MC/MCSubtargetInfo.h

  Log Message:
  -----------
  [MC] Add default ctor to SubtargetSubTypeAliasKV for zero-alias targets- #38762 (#212919)

Fixes a Windows MSVC 2019-only build break from 02da012 ("TableGen: Use
a compact table for CPU aliases", #211952).

That commit added std::array<SubtargetSubTypeAliasKV, NumAliases> to
SubtargetSubTypeKVStorage. SubtargetSubTypeAliasKV uses relative string
offsets, so it is non-copyable and declares only a two-argument
constructor -
no default constructor. In the MSVC 2019 STL, std::array<T, 0> still
holds a
real _Ty _Elems[1] and value-initializes it, so it requires T to be
default-constructible. Any target that defines no ProcessorAlias records
instantiates std::array<..., 0> and fails to compile. MSVC 2022 changed
this
member to a conditionally-empty type, so only MSVC 2019 is affected.

Fix: add a constexpr default constructor.

Co-Authored-By: Claude Opus 5
Signed-off-by: Munoz Jr, Ramon <ramon.g.munoz.jr at intel.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list