[PATCH] D104344: [modules] Track how headers are included by different modules.

Volodymyr Sapsai via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 15 18:28:38 PDT 2021


vsapsai created this revision.
Herald added a subscriber: ributzka.
vsapsai requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Currently we are using `HeaderSearch` state from building a module and
if an invisible submodule imports a non-modular header, we would avoid
importing the header again, even if it wasn't entered earlier due to the
visibility rules.

Track `isImport` and `NumIncludes` according to the visibility of the
[sub]modules that included a header.

rdar://64773328


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D104344

Files:
  clang/include/clang/Lex/HeaderSearch.h
  clang/include/clang/Serialization/ASTBitCodes.h
  clang/include/clang/Serialization/ASTWriter.h
  clang/lib/Lex/HeaderSearch.cpp
  clang/lib/Lex/PPDirectives.cpp
  clang/lib/Serialization/ASTReader.cpp
  clang/lib/Serialization/ASTWriter.cpp
  clang/test/Modules/Inputs/import-nonmodular/Modularized.framework/Headers/Invisible.h
  clang/test/Modules/Inputs/import-nonmodular/Modularized.framework/Headers/Visible.h
  clang/test/Modules/Inputs/import-nonmodular/Modularized.framework/Modules/module.modulemap
  clang/test/Modules/Inputs/import-nonmodular/Unmodularized.framework/Headers/Unmodularized.h
  clang/test/Modules/import-nonmodular.m

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D104344.352312.patch
Type: text/x-patch
Size: 12874 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210616/12eb48ba/attachment-0001.bin>


More information about the cfe-commits mailing list