[all-commits] [llvm/llvm-project] e06a91: [clang][modules] Avoid re-exporting PCH imports on...

Ben Langmuir via All-commits all-commits at lists.llvm.org
Thu Apr 20 11:30:04 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e06a91c5996b039cacd55e6ead0baf14424c740c
      https://github.com/llvm/llvm-project/commit/e06a91c5996b039cacd55e6ead0baf14424c740c
  Author: Ben Langmuir <blangmuir at apple.com>
  Date:   2023-04-20 (Thu, 20 Apr 2023)

  Changed paths:
    M clang/include/clang/Serialization/ASTReader.h
    M clang/lib/Serialization/ASTReader.cpp
    A clang/test/ClangScanDeps/modules-pch-imports.c
    A clang/test/Modules/submodule-visibility-pch.c

  Log Message:
  -----------
  [clang][modules] Avoid re-exporting PCH imports on every later module import

We only want to make PCH imports visible once for the the TU, not
repeatedly after every subsequent import. This causes some incorrect
behaviour with submodule visibility, and causes us to get extra module
dependencies in the scanner. So far I have only seen obviously incorrect
behaviour when building with -fmodule-name to cause a submodule to be
textually included when using the PCH, though the old behaviour seems
wrong regardless.

rdar://107449644

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




More information about the All-commits mailing list