[all-commits] [llvm/llvm-project] 586547: [clang][modules] Fix handling of `ModuleHeaderRole...

Jan Svoboda via All-commits all-commits at lists.llvm.org
Thu Oct 6 16:20:41 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 586547687946b27a99d3bb4241226f9f126a173e
      https://github.com/llvm/llvm-project/commit/586547687946b27a99d3bb4241226f9f126a173e
  Author: Jan Svoboda <jan_svoboda at apple.com>
  Date:   2022-10-06 (Thu, 06 Oct 2022)

  Changed paths:
    M clang/include/clang/Lex/ModuleMap.h
    M clang/lib/Lex/HeaderSearch.cpp
    M clang/lib/Lex/ModuleMap.cpp
    M clang/lib/Lex/PPDirectives.cpp
    M clang/lib/Serialization/ASTReader.cpp
    M clang/lib/Serialization/ASTWriter.cpp
    A clang/test/Modules/exclude-header-fw-umbrella.m

  Log Message:
  -----------
  [clang][modules] Fix handling of `ModuleHeaderRole::ExcludedHeader`

This is a follow-up to D134224. The original patch added new `ExcludedHeader` enumerator to `ModuleMap::ModuleHeaderRole` and started associating headers with the modules they were excluded from. This was necessary to consider their module maps as "affecting" in certain situations and in turn serialize them into the PCM.

The association of the header and module needs to be handled when deserializing the PCM as well, though. This patch fixes a potential assertion failure and a regression. This essentially reverts parts of feb54b6ded123f8118fdc20620d3f657dfeab485.

Reviewed By: Bigcheese

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




More information about the All-commits mailing list