[all-commits] [llvm/llvm-project] 86ecff: [Clang] Don't suppress vtable emission for classes...

Michael Spencer via All-commits all-commits at lists.llvm.org
Wed Jun 24 16:16:38 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 86ecfffe8ad988f3f6c6a4bb6c1717f13afd32a0
      https://github.com/llvm/llvm-project/commit/86ecfffe8ad988f3f6c6a4bb6c1717f13afd32a0
  Author: Michael Spencer <bigcheesegs at gmail.com>
  Date:   2026-06-24 (Wed, 24 Jun 2026)

  Changed paths:
    M clang/include/clang/AST/DeclBase.h
    M clang/lib/Sema/SemaDeclCXX.cpp
    A clang/test/PCH/pch-debuginfo-vtable.cpp

  Log Message:
  -----------
  [Clang] Don't suppress vtable emission for classes with -fmodules-debuginfo (#204662)

847f9cb0e868 made `Sema::DefineUsedVTables` skip
`Consumer.HandleVTable()` when `Class->shouldEmitInExternalSource()` is
true. This works for named C++20 modules as they have an object file,
but does not hold for -fmodules-debuginfo / -fpch-debuginfo.

This patch additionally gates that on `Class->isInNamedModule()`. This
is the same pattern used by the rest of codegen for this situation.

Needing to check this everywhere is a bit unfortunate. It would be good
to eventually refactor this class of checks to have clearer semantics
around named modules, debug info, and -fmodules-codgen.

Fixes https://github.com/llvm/llvm-project/issues/198587

Assisted-by: Claude Code: opus-4-8



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